Java Generics not working

manson

New Member
Why Generics not working in my machine .Why below code not working in Eclipse without Type casting to the String.I am using Java 1.6\[code\]List<String> list = new ArrayList<String>();list.add("hello");String s = list.get(0); // no cast\[/code\]Regards,Raj
 
Back
Top