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

CSE MCQs :: JAVA MCQs

  1. Which of these class object can be used to form a dynamic array?
  2. A.
    ArrayList
    B.
    Map
    C.
    Vector
    D.
    Both a & b

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of these are legacy classes?
  4. A.
    Stack
    B.
    Hashtable
    C.
    Vector
    D.
    All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of these is the interface of legacy?
  6. A.
    Map
    B.
    Enumeration
    C.
    HashMap
    D.
    Hashtable

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. What is the name of data member of class Vector which is used to store number of elements in the vector?
  8. A.
    length
    B.
    elements
    C.
    elementCount
    D.
    capacity

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of these methods is used to add elements in vector at specific location?
  10. A.
    add()
    B.
    set()
    C.
    AddElement()
    D.
    addElement()

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of these class object uses key to store value?
  12. A.
    Dictionary
    B.
    Map
    C.
    Hashtable
    D.
    All if the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of these method is used to insert value and its key?
  14. A.
    put()
    B.
    set()
    C.
    insertElement()
    D.
    addElement()

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of these is the interface of legacy is implemented by Hashtable and Dictionary classes?
  16. A.
    Map
    B.
    Enumeration
    C.
    HashMap
    D.
    Hashtable

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of these is a class which uses String as a key to store the value in object?
  18. A.
    Array
    B.
    ArrayList
    C.
    Dictionary
    D.
    Properties

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which of these methods is used to retrieve the elements in properties object at specific location?
  20. A.
    get()
    B.
    Elementat()
    C.
    ElementAt()
    D.
    getProperty()

    View Answer

    Workspace

    Discuss Discuss in Forum