Question: If myList is a ArrayList, and we execute the code below: myList.add ( horse ) ; myList.add ( goat ) ; myList.add ( 1 ,

If myList is a ArrayList, and we execute the code below:
myList.add(horse);
myList.add(goat);
myList.add(1,fish);
myList.add(1,dog);
myList.add(cat);
How many entries are moved forward in all the call to makeRoom()?
Group of answer choices
0
1
2
3
5

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!