The type Collection is not generic; it cannot be parameterized with arguments <? extends E>

后端 未结 13 495
清酒与你
清酒与你 2020-12-05 03:02

I have a strange problem with Eclipse Galileo.
I set Java 1.6 as my JRE. On this line of code

List templates = new ArrayList ();

I see

13条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 03:51

    Some ideas:

    • check the JRE library being used in your project (check the package explorer).
    • check the installed JREs in the eclipse settings (same as used by ant).
    • comment out the line just to check if it really is the error cause.
    • retype the whole line from scratch.
    • install a new (clean) version of eclipse, in a new folder (testing).

提交回复
热议问题