blob: 3cf91e2e8beb2689b560db5e9fe3bbf24e98ba69 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
public class Test {
public static void main(String[] args) {
VarArg jp = new JavaPrinter();
VarArg ip = new InheritingPrinter();
VarArg sp = new ScalaPrinter();
doYourThing(jp);
doYourThing(ip);
doYourThing(sp);
}
public static void doYourThing(VarArg va) {
va.doit("one", "two", "three");
System.out.println();
}
}
|