Assume a Customer class has a constructor with a name parameter that initializes a name instance variable,

Question:

Assume a Customer class has a constructor with a name parameter that initializes a name instance variable, and assume this class includes a getName method. A driver for this class includes this code:

LinkedList customers new Linked List (); Customer friend = new Customer("Pratima"); int index; =

Add code that inserts into the customers list a new customer named “Peter”. Make the insertion immediately before the friend object.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: