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

后端 未结 13 425
清酒与你
清酒与你 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:54

    Sometimes it's an eclipse hiccup and eclipse -clean plus refreshing all projects helps.

    Edit

    Does it change anything when you replace your code with:

    java.util.List templates = new java.util.ArrayList();
    

    or even

    java.util.List<Object> templates = new java.util.ArrayList<Object>();
    

    ?

    0 讨论(0)
提交回复
热议问题