Top Posters
Since Sunday
5
a
5
k
5
c
5
B
5
l
5
C
4
s
4
a
4
t
4
i
4
r
4
New Topic  
seeb1999 seeb1999
wrote...
Posts: 480
Rep: 2 0
3 years ago
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);


▸ Code fragment A runs as fast as code fragment B.

▸ Code fragment B runs faster than code fragment A.

▸ Code fragment A runs faster than code fragment B.
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 58 times
1 Reply
Replies
Answer verified by a subject expert
kirakira15kirakira15
wrote...
Posts: 373
3 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

seeb1999 Author
wrote...

3 years ago
I appreciate what you did here, answered it right Smiling Face with Open Mouth
wrote...

Yesterday
Helped a lot
wrote...

2 hours ago
This calls for a celebration Person Raising Both Hands in Celebration
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1276 People Browsing
Related Images
  
 265
  
 226
  
 304
Your Opinion