jens4789 jens4789
  • 09-12-2022
  • Computers and Technology
contestada

Suppose list1 is a MyArrayList and list2 is a MyLinkedList. Both contains 1 million double values. Analyze the following code:
A: for (int i = 0; i < list1.size(); i++)
sum += list1.get(i);
B: for (int i = 0; i < list2.size(); i++)
sum += list2.get(i);
Code fragment A is more efficient that code fragment B.

Respuesta :

Otras preguntas

The world is divided into 24 time zones. a. true B. false
Why are the nations of Europe pointing at each other on "the crime of ages?"
What is green in the morning black in the afternoon blue in the evening and white in the night
"Our many Jewish friends and acquaintances are being taken away in droves. The Gestapo is treating them very roughly and transporting them in cattle cars t o We
Insert parentheses to make each statement true. 6+7•4-2=26
why is it always cooler by the water on a hot summer day?
i need a concusion on that allows marrijuana to be legal
what is poop how does it form
True or false clear fluid leaking out of your car is usually coolant and means you should check the water pump.
Classify the following as a type of potential energy or kinetic energy (use the letters K or P) 1. A bicyclist pedaling up a hill _____ 2. An archer with his bo