Computers and Technology

Suppose list1 is an arraylist and list2 is a linkedlist. 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);
a. code fragment a runs faster than code fragment b.
b. code fragment b runs faster than code fragment a.
c. code fragment a runs as fast as code fragment b.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:00, HannahVance99
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, lin550
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
image
Computers and Technology, 23.06.2019 09:00, paulusl19
The first screen you see when you open word2016 what is called?
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, nsjcbdhcb
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
Do you know the correct answer?
Suppose list1 is an arraylist and list2 is a linkedlist. both contains 1 million double values. anal...

Questions in other subjects:

Konu
Physics, 10.09.2019 22:30
Konu
Mathematics, 10.09.2019 22:30