List<Number>
and List<Integer>
are different type: if that is the case why overloading the following method does not compile?
public static void iMethod(List<Number> nList){
System.out.println(nList);
}
public static void iMethod(List<Integer> iList){
System.out.println(iList);
}
error:
Erasure of iMethod<List<integer>> is same as another method in class