Home » JAVA Programming » Collections » Question
  1. What is the output of this program?
    import java.util.*;
    public class Linkedlist_Example
    {
    public static void main(String args[])
    {
    LinkedList object = new LinkedList();
    object.add("I");
    object.add("L");
    object.add("U");
    object.removeFirst();
    System.out.println(object);
    }
    }
    1. [I, L, U]
    2. [I, L]
    3. [L, U]
    4. [I, U]
    5. None of these
Correct Option: C

[L, U]



Your comments will be displayed only after manual approval.