Question: Suppose list 1 is an MyArrayList and list 2 is a MyLinkedList. Both contains 1 million double values. Analyze the following code: A: while (

Suppose list1 is an MyArrayList and list2 is a MyLinkedList. Both contains 1 million double values. Analyze the following code:
A:
while (list1.size()>0)
list1.remove(size()-1);
B :
while (list2.size()>0)
list2.remove(size()-1);
Suppose list 1 is an MyArrayList and list 2 is a

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!