| Author |
Worning: LinkedList is Raw datatype. References to generic type LinkedList<E> should be parametrized
|
minal silimkar
Ranch Hand
Joined: Nov 25, 2007
Posts: 133
|
|
This line shows warning in eclipse.
In command prompt, it does not show any warning.
After adding object, it removes error.
|
Minal Silimkar
|
 |
Mehar Simhadri
Greenhorn
Joined: Jan 25, 2009
Posts: 4
|
|
Hi
You have to use any collection with parameters
look at this http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html for more information
-Mehar
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32654
|
|
You are right that you ought to use Lists with parameters, but it is not absolutely compulsory. That is why you receive a warning, not a compiler error, for missing out the parameters.
Another nice reference about generics is here, in the Java Tutorials, and you can find another useful resource by googling for "Angelika Langer Java generics FAQ."
|
 |
minal silimkar
Ranch Hand
Joined: Nov 25, 2007
Posts: 133
|
|
|
Thank you Mehar and Campbell for explaination and sending the refernces.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32654
|
|
You're welcome
|
 |
 |
|
|
subject: Worning: LinkedList is Raw datatype. References to generic type LinkedList<E> should be parametrized
|
|
|