Question: import Java.uti 1 . ; class Collection iterators f public static void main ( String args [ ] ) 1 LinkedList list = new

import Java.uti1.";
class Collection iterators
f
public static void main(String args[])
1
LinkedList list = new LinkedList();
list. add(new Integer(2));
list. add (new Integer(8));
list. add (new Integer(5));
list. add (new Integer(1));
Iterator i= list. iterator();
Collections reverse(1ist);
Collections.sort(1ist);
while (i. hasNext ())
System.out.print(i.next()+"");
}
 import Java.uti1."; class Collection iterators f public static void main(String args[])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!