The parameter is ArrayList<T>
how can I get the T's className
public static <T extends Object> void test(ArrayList<T> list){
T temp;
Class classType=temp.getClass();
System.out.println(classType.getName());
}
It will be failed to compile that:he local variable temp may not have been initialized.
But how can I get the className of the template class.