Question: I need help completing these methods for a linkedList in Java. @Override /** Return true if this list contains the element e */ public boolean

I need help completing these methods for a linkedList in Java.  @Override /** Return true if this list contains the element e */ public boolean contains(Object e) { // Left as an exercise return true; } @Override /** Return the element at the specified index */ public E get(int index) { // Left as an exercise return null; } @Override /** Return the index of the first matching element in * this list. Return -1 if no match. */ public int indexOf(Object e) { // Left as an exercise return 0; } @Override /** Return the index of the last matching element in * this list. Return -1 if no match. */ public int lastIndexOf(E e) { // Left as an exercise return 0; } @Override /** Replace the element at the specified position * in this list with the specified element. */ public E set(int index, E e) { // Left as an exercise return null; }
 @Override public void remove() { // Left as an exercise } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!