Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: 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

    Answer : Option C

    Explanation :

    removeLast() and removeFirst() methods are used to remove elements in end and beginning of a linked list.


Be The First To Comment