1 public class LinkedListTest {
2 public static main( String[] args ) {
4 LinkedList list = new LinkedList();
5 System.out.println( "list should have zero elements: "+list.size() );
7 list.push( (Object)new Integer( 3 ) );
8 list.push( (Object)new Integer( 4 ) );
10 System.out.println( "list should have two elements: "+list.size() );
12 Integer x = (Integer)list.pop();
13 x = (Integer)list.pop();
15 System.out.println( "should be a 3: "+x );