summaryrefslogtreecommitdiff
path: root/tutorial/examples/multimethod/Test2.oj
blob: e714e8999d3c836e6583aaa54ed109ee9ab0fa2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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" );
    }

}