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

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

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

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

  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

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

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

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

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

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