不懂,为什么要强制类型转换,又麻烦,还要加泛型,加后还不能有字符串,直接这样不是更好?
for(Object object:lis){
System.out.println(object);
}//或者直接用迭代器输出
Iterator it3=lis.iterator();
while(it3.hasNext()){
System.out.println(it3.next());
} for(Object object:lis){
System.out.println(object);
}//或者直接用迭代器输出
Iterator it3=lis.iterator();
while(it3.hasNext()){
System.out.println(it3.next());
}2017-02-07
举报