Hi, dear ranchers! I am very confused. Why I can add Integer or Short into list, that must contain only parants of Number. And I cannot insert Object while Object is superclass of Number.
Hi! Please explain me why I can't invoke addandDisp with parameters ls1 and object of type Object? What second parameter is allowed with first parameter will be ls1?
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"); } }