summaryrefslogtreecommitdiff
path: root/tutorial/examples/multimethod/Test2.oj
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/examples/multimethod/Test2.oj')
-rw-r--r--tutorial/examples/multimethod/Test2.oj20
1 files changed, 20 insertions, 0 deletions
diff --git a/tutorial/examples/multimethod/Test2.oj b/tutorial/examples/multimethod/Test2.oj
new file mode 100644
index 0000000..e714e89
--- /dev/null
+++ b/tutorial/examples/multimethod/Test2.oj
@@ -0,0 +1,20 @@
+package examples.multimethod;
+
+import java.awt.*;
+
+public class Test2 instantiates MultimethodClass
+{
+
+ public multiform void foo( Panel a ) {
+ System.out.println( "panel" );
+ }
+
+ public multiform void foo( Button a ) {
+ System.out.println( "button" );
+ }
+
+ public multiform void foo( Canvas a ) {
+ System.out.println( "canvas" );
+ }
+
+}