如下代碼:
1?????????List?appleList?=?new?ArrayList<String>();
2?????????for(String?apple:appleList){
3?????????????//blabla
4?????????}
編譯器 complains:Type mismatch: cannot convert from element type Object to String
http://www.infoq.com/cn/articles/cf-java-generics