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

后端 未结 13 496
清酒与你
清酒与你 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 templates = new java.util.ArrayList();
    
    
    

    ?

    提交回复
    热议问题