Eclipse: Syntax Error, parameterized types are only if source level is 1.5

后端 未结 17 1829
清酒与你
清酒与你 2020-12-13 01:55

I try to use the following code:

ArrayList
Map

Eclipse complains about both of them: Syntax Error, para

17条回答
  •  一向
    一向 (楼主)
    2020-12-13 02:42

    This works for me .

    In eclipse go to project properties -> java compiler.

    Then change to java higher than 1.5 .

    change Compiler compliance settings to 1.6 change Generated.class files compatibility to 1.6 change Source compatibility to 1.6

    Thanks.

提交回复
热议问题