Myeclipse使不了泛型啊??我装的是1.6的jdk?
我是这样定义的:List<String> str;
包也导入了啊?导入的是这个包 import java.util.List;
郁闷啊!!帮帮忙吧!!
谢谢!!

解决方案 »

  1.   

    你的myeclipse的版本是多少?报的错误是什么?
      

  2.   

    6.5的!!The type List is not generic; it cannot be parameterized with arguments <String>
    如果不用泛型 直接这样就OK :List<String> str;
      

  3.   

    看一下Window-〉Preferences->Java ->Compiler->JDK Compliance中的compiler compliance level是多少。
      

  4.   

    到windows->preferences, 改一下Eclipse默认使用的编译器,改成5。0以上就可以了
      

  5.   

    查看以下installed jre默认用的是那个版本的?
      

  6.   

    把程序直接在控制台上编译看看。我刚装myeclipse6.5,jdk,eclipse都是自带的,不知有没有没有带jdk,eclipse的版本,还是认真看看jdk的版本吧
      

  7.   

    你最好装个自己的jdk 不要用eclipse 自带的
    然后配置成默认的即可 windows->preferences Installed JRES 新增加一个 换成自己本地转的jdk