7.2 Hypothesize the output from the following method segment:
LinkedList letters = new LinkedList();
ListIterator itr = letters.listIterator();
itr.add ('f');
itr.add ('t');
itr.previous();
itr.previous();
itr.add ('e');
itr.add ('r');
itr.next();
itr.add ('e');
itr.add ('c');
itr = letters.listIterator();
itr.add ('p');
System.out.println (letters);
Test your hypothesis.
 
 
View Solution
 
 
 
<< Back Next >>