Home / CSE MCQs / JAVA MCQs :: Collections - Java

CSE MCQs :: JAVA MCQs

  1. Which of these packages contain all the collection classes?
  2. A.
    java.lang
    B.
    java.util
    C.
    java.net
    D.
    java.awt

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of these classes is not part of Java's collection framework?
  4. A.
    Maps
    B.
    Array
    C.
    Stack
    D.
    Queue

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of these interface is not a part of Java's collection framework?
  6. A.
    List
    B.
    Set
    C.
    SortedMap
    D.
    SortedList

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of these methods deletes all the elements from invoking collection?
  8. A.
    clear()
    B.
    reset()
    C.
    delete()
    D.
    refresh()

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. What is Collection in Java?
  10. A.
    A group of objects
    B.
    A group of classes
    C.
    A group of interfaces
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of these interface declares core method that all collections will have?
  12. A.
    set
    B.
    EventListner
    C.
    Comparator
    D.
    Collection

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of these interface handle sequences?
  14. A.
    Set
    B.
    List
    C.
    Comparator
    D.
    Collection

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of these interface is not a part of Java's collection framework?
  16. A.
    List
    B.
    Set
    C.
    SortedMap
    D.
    SortedList

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of these interface must contain a unique element?
  18. A.
    Set
    B.
    List
    C.
    Array
    D.
    Collection

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which of these is Basic interface that all other interface inherits?
  20. A.
    Set
    B.
    Array
    C.
    List
    D.
    Collection

    View Answer

    Workspace

    Discuss Discuss in Forum