Why are
LinkedList<String>[] list = new LinkedList[32];
StaticError:Bad types in assignment:from raw LinkedList[] to LinkedList<String>[]
And
LinkedList<String>[] list= (LinkedList<String>[]) new LinkedList[32];
StaticError: Bad types in cast: from raw LinkedList[] to LinkedList<String>[]
both compiling but giving me runtime errors about raw types?
I need to create an array of LinkedLists (basically for a hashtable...and it's homework so I can't deviate too much from it). I was planning on handling the collisions by using separate chaining, that is just filling repeated entries in the array with sequential elements in the LinkedList. Any thoughts would be appreciated.