I have been asked this question in an interview.
can anyone explain it.
public class A{
public void show(List <String>list1,List<Integer>lists2){...}
public void show(List <Integer>list1,List<String>lists2){...}
}
public class B{
public static void main(..){
A a=new A();
List<String> list1;
List<Integer>lists2;
a.show(list1,lists2);
}
}
I said 2 function would be called.. but when i worte in neatbeans it gave error of same name function been called...??? why so isnt overloading concept used here???
showmethods have the same erasure.