public class VarTest {
public static void main(String[] X) {
Integer x = 1;
Integer y = 2;
print(1);
print(1,2);
print(x);
print(x,y);
}
static void print(int i) {
System.out.print(1);
}
static void print(Integer... i) {
System.out.print(2);
}
static void print(Integer i) {
System.out.print(3);
}
static void print(int... i) {
System.out.print(4);
}
}
Login in to like
Login in to comment