generics "uses unchecked or unsafe operations" problem
Dinah Gans
Greenhorn
Joined: Feb 15, 2010
Posts: 8
posted
0
Can someone help me understand why this gives me the following Notes?
I don't understand why my constructor doesn't seem to be using generics for myList even though when I created it I said it held generics? Thanks in advance for the help!
Note: InfiniteInt.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
InfiniteInt extends the raw type DLList. You should move the Integer generic type to DLList instead:
And you should know that Integer is final so there are no subclasses of Integer
Wow thanks!!! That solved all of the problems I was having with this & explains why it was telling me "DLList<Integer> cannot be applied to (int)" when I had changed both classes to have generics.