

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


b. public Object pop()
c. public Object push(Object item)
b. public Object pop()
c. public Object push(Object item)
LinkedList Method Summary
void addFirst(Object o) Inserts the given element at the beginning of this list. void addLast(Object o) Appends the given element to the end of this list. Object getFirst() Returns the first element in this list. Object getLast() Returns the last element in this list. Object removeFirst() Removes and returns the first element from this list. Object removeLast() Removes and returns the last element from this list. int size() Returns the number of elements in this list.
Stack Method Summary
boolean isEmpty() Tests if this stack is empty. Object pop() Removes the Object at the top of this stack and returns that Object. Object push(Object item) Pushes an item onto the top of this stack.
Queue Method Summary
boolean isEmpty() Tests if this queue is empty. Object pop() Removes the Object at the front of the list and returns that Object. Object push(Object item) Adds an item at the front of the list.