1.

What is the output of this program?import java.util.*; public class Collection_AlgosExample { public static void main(String args[]) { LinkedList listobject = new LinkedList(); listobject.add(new Integer(13)); listobject.add(new Integer(23)); listobject.add(new Integer(3)); listobject.add(new Integer(11)); Iterator Itr = listobject.iterator(); Collections.reverse(listobject); Collections.sort(listobject); while(Itr.hasNext()) System.out.print(Itr.next() + " "); } }

A. 3 11 13 23
B. 13 23 3 11
C. 3 11 13
D. 13 11 3
E. 23 13 11 3
Answer» B. 13 23 3 11


Discussion

No Comment Found

Related MCQs