Home / CSE MCQs / JAVA MCQs :: java.util Package

CSE MCQs :: JAVA MCQs

  1. Which of these methods can be used to delete the last element in a LinkedList object?
  2. A.
    remove()
    B.
    delete()
    C.
    removeLast()
    D.
    deleteLast()

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of these method is used to change an element in a LinkedList Object?
  4. A.
    change()
    B.
    set()
    C.
    redo()
    D.
    add()

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of these object stores association between keys and values?
  6. A.
    Hash table
    B.
    Map
    C.
    Array
    D.
    String

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of these classes provide implementation of map interface?
  8. A.
    ArrayList
    B.
    HashMap
    C.
    LinkedList
    D.
    DynamicList

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of these method is used to remove all keys/values pair from the invoking map?
  10. A.
    delete()
    B.
    remove()
    C.
    clear()
    D.
    removeAll()

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of these method Map class is used to obtain an element in the map having specified key?
  12. A.
    search()
    B.
    get()
    C.
    set()
    D.
    look()

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of these methods can be used to obtain set of all keys in a map?
  14. A.
    getAll()
    B.
    getKeys()
    C.
    keyall()
    D.
    keySet()

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of these method is used add an element and corresponding key to a map?
  16. A.
    put()
    B.
    set()
    C.
    redo()
    D.
    add()

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of these standard collection classes implements all the standard functions on list data structure?
  18. A.
    Array
    B.
    LinkedList
    C.
    HashSet
    D.
    AbstractSet

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which of these classes implements Set interface?
  20. A.
    ArrayList
    B.
    HashSet
    C.
    LinkedList
    D.
    DynamicList

    View Answer

    Workspace

    Discuss Discuss in Forum