summaryrefslogtreecommitdiff
path: root/tutorial/examples/copy/Test.oj
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/examples/copy/Test.oj')
-rw-r--r--tutorial/examples/copy/Test.oj52
1 files changed, 52 insertions, 0 deletions
diff --git a/tutorial/examples/copy/Test.oj b/tutorial/examples/copy/Test.oj
new file mode 100644
index 0000000..f0db01d
--- /dev/null
+++ b/tutorial/examples/copy/Test.oj
@@ -0,0 +1,52 @@
+package examples.copy;
+
+
+import java.awt.Panel;
+import java.util.*;
+import java.io.PrintStream;
+
+
+public class Test instantiates CopiedClass
+ extends Panel
+{
+ private int iii = 0;
+
+ private Test n = null;
+
+ private String str = "string";
+
+ public Test() {
+ super();
+ }
+
+ /**
+ * @param
+ * @return
+ * @exception
+ * @see java.lang.Object
+ */
+ public static void main( String[] argv ) {
+ PrintStream out = System.out;
+ PrintStream error = java.lang.System.err;
+ out.println( "Hello" + " " + "World" );
+ Test n = new Test();
+ java.lang.System.err.println( "done. " );
+ Test test = new Test();
+ test.foo();
+ }
+
+ public Test( String str ) {
+ this.str = str;
+ n = null;
+ }
+
+ public int foo() {
+ return iii;
+ }
+
+ public String toString() {
+ if (n == null) return str;
+ return str + n;
+ }
+
+}