Hi All, I have this program in my eclipse. And if I compile this with JDK 1.5(build path -> configure build path ->java compilern ->JDK compliance -> compiler compliance level = 1.5), I get the type erasure error for method m1
I have an option of choosing compiler compliance level as 5 in the driop down (build path -> configure build path ->java compilern ->JDK compliance -> compiler compliance level = 5), I don't get this error.
I don't see any difference in this setting I select. But why do I get the error? whats the difference between 1.5 and 5
import java.util.*;
class TestWrapper
{
public static void main(String[] args) {
List<Number> ls1 = new ArrayList<Number>();
List<String> ls2 = new ArrayList<String>();
m1(ls1,ls2);
}
public static void m1(List<Integer> l1,List<Integer> l2){}
public static void m1(List<Number> l1,List<String> l2) {}
Thanks all for the answers Java :)