Top Posters
Since Sunday
5
o
5
4
m
4
b
4
x
4
a
4
l
4
t
4
S
4
m
3
s
3
New Topic  
lizsmith lizsmith
wrote...
Posts: 486
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(0);

B:
while (list2.size() > 0)
list2.remove(0);


▸ Code fragment B runs faster than code fragment A.

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

▸ 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 99 times
1 Reply
Replies
Answer verified by a subject expert
vvnluuvvnluu
wrote...
Posts: 384
3 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here

Related Topics

lizsmith Author
wrote...

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

Yesterday
Brilliant
wrote...

2 hours ago
This site is awesome
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1100 People Browsing
Related Images
  
 512
  
 215
  
 162