code :
import java.util.*;
class test{
public static void main(
String[] args){
test t = new test();
List<String> l = new ArrayList<String>();
l.add(new String("abc"));
l.add(new String("def"));
System.out.println(t.meth(l));
}
public <T> List<T> meth(List<?> type)
{
System.out.println(type); // 1
return new ArrayList<T>();// 2
}
}
line 1 print the content of l,line 2 construct a List,what kind of Object in it?,is there somewhere i can code to add element to it?