有人知道为什么编译器不能在“short”中转换值“7”吗?显式转换正在工作,但在传递参数时它不起作用!!!
class Alien {
String invade(short ships) { return "a few"; }
String invade(short... ships) { return "many"; }
}
public class Wind {
public static void main(String [] args) {
short temp = 7;
System.out.println(new Alien().invade(7));
}
}