Hi! I wonder, why this code has a compiler error (ambiguous method call). Doesn't widening beat boxing?
public class Pennard {
public static void main(
String argv[]) {
Pennard p=new Pennard();
int d=7;
p.doit(d,d);
<-compile error here }
public void doit(long...x){
System.out.println("long...x");
}
public void doit(Integer...x){
System.out.println("Integer...x");
}
}