use - lst.remove( 0 ); java.util.Iterator<Integer>...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1. ArrayList<Integer> lst = new ArrayList<Integer>(); lst.add(i); ListIterator<Integer> itr = lst.listIterator(0); while( itr.hasNext() ) { System.out.println(itr.next()); } while( itr.hasPrevious() ) { System.out.println(itr.previous()); } 2. MyLinkedList<Integer> lst = new MyLinkedList<Integer>( ); lst.add( i );
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: lst.remove( 0 ); java.util.Iterator<Integer> itr = lst.iterator( ); 3. Hashtable<String,Employee> h = new Hashtable<String,Employee>(); Employee e = new Employee("Phil", 22500); h.put(e.name, e); System.out.println(h.get("phil")); System.out.println(h.remove("Phil"));...
View Full Document

This note was uploaded on 02/18/2011 for the course 22C 031 taught by Professor Kasturi during the Spring '11 term at University of Iowa.

Ask a homework question - tutors are online