Question: Four strings are read from input and inserted into animalList. animalIterator is assigned with the ListIterator of animalList and is moved to the end of

Four strings are read from input and inserted into animalList. animalIterator is assigned with the ListIterator of animalList and is moved to the end of animalList. Complete the following tasks:
Move animalIterator between the elements at index 2 and index 3.
Use animalIterator to insert "wasp" between the elements at index 2 and index 3.
Ex: If the input is cheetah deer bird lizard, then the output is:
List contains: cheetah deer bird wasp lizard animalIterator is between wasp and lizard.

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 Programming Questions!