public class test {
public static void main(String[] args) {
Foo foo = new Foo();
foo.test(1);
}
}
class Foo {
void test(byte a) {
System.out.println("byte");
}
void test(int... a) {
System.out.println("int...");
}
void test(short a) {
System.out.println("short");
}
void test(long a) {
System.out.println("long");
}
}
为什么输出结果是long啊。