このコードがあいまいな過負荷エラーをスローする理由を誰か説明してもらえますか?確かに Integer メソッドはより具体的で適用可能ですか?
ありがとう、
ネッド
package object_orientation;
public class Ambiguous {
//ambiguous error compiler unsure whether boxing is needed or not
static void overload(Integer... d){
System.out.println("Integer");
}
static void overload(long... d){
System.out.println("Long");
}
public static void main(String a[]){
int i = 1;
overload(i);
}
}