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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum