public static native void printString(String s);
public static void println(String s) {
- System.printString(s);
- System.printString("\n");
+ System.printString(s+"\n");
}
-
+
+ public static void println(Object o) {
+ System.printString(""+o+"\n");
+ }
+
public static void print(String s) {
System.printString(s);
}
+ public static void print(Object o) {
+ System.printString(""+o);
+ }
+
public static void error() {
System.printString("Error (Use Breakpoint on ___System______error method for more information!)\n");
}
+public class Foo {
+ Foo() {}
+ public String toString() {
+ return "aFoo";
+ }
+}
+
+
public class TertiaryTest {
static public void main( String[] args ) {
int x = 3;
System.out.println( "x should be 3: "+x );
System.out.print ( "y should be 6: "+y+"\n" );
System.out.println( "z should be 8: "+z );
+ System.out.println( new Foo() );
}
}
\ No newline at end of file