SCJP Certification

Sun Certified Java Programmer Certification exam essentials

February 11th, 2010

What are the methods of the LinkedList class?

Java Facts, by Daisy Williams.

The LinkedList class defines the following methods for manipulating lists. These are as follows:

void addFirst(E obj): This method inserts an element at the beginning of the list.
void addLast(E obj): This method inserts an element at the end of a list
>E getFirst():
This method is used to retrieve the first element from the list.
E getLast(): This method retrieves the last element from the list.
E removeFirst(): This removes the first element from the list.
E removeLast(): This method removes the last element from the list.
Here, obj specifies the item.

Share

Back Top

Responses to “What are the methods of the LinkedList class?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*