Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

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

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    addElement() is used to add data in the vector, to obtain the data we use elementAt() and to first and last element we use firstElement() and lastElement() respectively.


Be The First To Comment