The type List is not generic; it cannot be parameterized with arguments <String> [message #169800] |
Wed, 06 September 2006 15:29 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: lonewolf32us.yahoo.com
Can anyone explain the following error in Eclipse 3.2? I am running Java SDK
1.6 and Eclipse's compliance settings are set to "6.0"
Offending code:
List<String> phases = new ArrayList<String>();
Error message:
The type List is not generic; it cannot be parameterized with arguments
<String>
If I change List to ArrayList, it compiles, however I should not need to do
this.
Thanks,
Dave
|
|
|
|
|
Re: The type List is not generic; it cannot be parameterized with arguments <String> [message #169886 is a reply to message #169800] |
Thu, 07 September 2006 06:46 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: michael.illgner.email.de
Dave wrote:
> Can anyone explain the following error in Eclipse 3.2? I am running Java SDK
> 1.6 and Eclipse's compliance settings are set to "6.0"
>
> Offending code:
> List<String> phases = new ArrayList<String>();
>
> Error message:
> The type List is not generic; it cannot be parameterized with arguments
> <String>
>
> If I change List to ArrayList, it compiles, however I should not need to do
> this.
>
Dumb Question ...
are you sure that List is from package java.util and not from
javax.swing ? Eclipse often chooses the swing version during auto
complete ....
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10604 seconds