This no longer valid
Java although it will be permitted indefinitely:
>> LinkedList list = new LinkedList();
What is this a list of? You have not specified and the compiler feels uncomfortable adding objects to a list whose content is unspecified.
>> list.addFirst(gs);
Try to get in the habit of specifying what's in your collections. Also, use the least specific type you can get away with. Here I am using a List:
List<Apple> list = new LinkedList<Apple>();
list.add( new Apple() ); // Calling add( Apple ) with an Apple, no problem.
list.add( new Hummer() ); // Whoa buster! There is no add( Hummer ) method!
[ September 07, 2005: Message edited by: Rick O'Shay ]