R
R
Hello everybody.
I'm using Eclipse (Linux) and JDK 1.5 with generics.
Eclipse points a warning in my generic code.
This is my code:
// generic LinkedList - this is OK
LinkedList <Record> Results = new LinkedList <Record> ();
but later on when I call add method with Record object as a parameter:
Results.add(rec);
Eclipse shows a warning:
The method add(Object) belongs to raw type LinkedList.
References to generic type LinkedList<E> should be parametarized.
Yes I know it's only a warning but I don't know why it occured.
I saw few examples on the web and all were almost the same as mine.
thanks in advance for your help
best regards
R
I'm using Eclipse (Linux) and JDK 1.5 with generics.
Eclipse points a warning in my generic code.
This is my code:
// generic LinkedList - this is OK
LinkedList <Record> Results = new LinkedList <Record> ();
but later on when I call add method with Record object as a parameter:
Results.add(rec);
Eclipse shows a warning:
The method add(Object) belongs to raw type LinkedList.
References to generic type LinkedList<E> should be parametarized.
Yes I know it's only a warning but I don't know why it occured.
I saw few examples on the web and all were almost the same as mine.
thanks in advance for your help
best regards
R