I've come across an example where I'm not sure about the behavior of Generics syntax.
public void m1(List<String> list) {
System.out.println("List size" + list.size());
}
public void m1(List<Integer> list) {
}
Here, m1
method is overloaded but it gives compile time error in Eclipse
as,
Erasure of method m1(List) is the same as another method in type Test
Is the generic syntax of the methods is removed at compile time? Any ideas why is this happening?