Home / CSE MCQs / Apache Common Collections ::

CSE MCQs :: Apache Common Collections

  1. Which Map is synchronized?
  2. A.
    Hashtable
    B.
    ConcurrentSkipListMap
    C.
    ConcurrentHashMap
    D.
    All of these

  3. Which of these is not an interface in the Collections Framework?
  4. A.
    Collection
    B.
    Group
    C.
    Set
    D.
    List

  5. Which is best suited to a multi-threaded environment?
  6. A.
    WeakHashMap
    B.
    Hashtable
    C.
    HashMap
    D.
    ConcurrentHashMap

  7. concurrentSkipListMap allows
  8. A.
    one null key
    B.
    many null values
    C.
    all
    D.
    None

  9. The accuracy and efficiency of a HashMap can be guaranteed with
  10. A.
    override equals method
    B.
    Override hashCode method
    C.
    None of these
    D.
    All of these

  11. Which allows the removal of elements from a collection?
  12. A.
    Enumeration
    B.
    Iterator
    C.
    Both
    D.
    None

  13. The Comparable interface contains which called?
  14. A.
    toCompare
    B.
    compare
    C.
    compareTo
    D.
    compareWith

  15. Which provides better performance for the insertion and removal from the middle of the list?
  16. A.
    Vector
    B.
    ArrayList
    C.
    LinkedList
    D.
    All of these

  17. Which of these class should be preferred to be used as a key in a HashMap?
  18. A.
    String
    B.
    Integer
    C.
    Double
    D.
    Any of these

  19. Iterator returned by ConcurrentHashMap on key, value and entry is?
  20. A.
    Fail-fast
    B.
    Fail-safe
    C.
    None
    D.
    All