1.

Which of these methods can be used to delete the last element in a LinkedList object?(a) remove()(b) delete()(c) removeLast()(d) deleteLast()The question was posed to me in final exam.Enquiry is from Java.util in division java.util – The Collections Framework of Java

Answer» CORRECT answer is (c) removeLast()

For explanation I would SAY: removeLast() and removeFirst() methods are used to remove elements in END and beginning of a linked LIST.


Discussion

No Comment Found

Related InterviewSolutions