Question: Add the following methods to the Linked List class you're writing in class ( Do NOT import Java's LinkedList ) : Method 1 : The
Add the following methods to the Linked List class you're writing in class Do NOT import Java's LinkedList:
Method : The clone method creates a new Linked List that contains all of the elements as the current list. It returns the new list. The method's return type is "Object" because it is a standard Java method and that is what Java stipulates. The object the method actually returns is a LinkedList. You don't need to do any type casting.
@override
public object clone
Method : The containsAll method is given a LinkedList object and returns true if all of the elements in that list are also in the current list.
public boolean containsAllLinkedList
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
