Calvin's Tech Space

成于坚忍,毁于浮躁

   :: 首页 :: 联系 :: 聚合  :: 管理

公告

       Locations of visitors to this page

搜索

  •  

最新评论


如下代码:

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


posted on 2011-06-17 18:47 calvin 阅读(642) 评论(0)  编辑  收藏 所属分类: Java

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问