Suppose you want to use a for loop to iterate through an array named anArray. How would you indicate the number of times the loop will be performed?

A. final Integer N = anArray.length;
for (Integer i = 0; i < N; i++) {...
B. anArray.length = N;
for (Integer i = 0; i < anArray.length; i++) {...
C. for (anArray.length = 0; anArray.length < N; anArray.length++) {...
D. final Integer N = anArray.length;
for (Integer i = anArray.length; i < N; i++) {...

Answer: A

Computer Science & Information Technology

You might also like to view...

The value for the target attribute that will cause a link to open in the frame that contains the link is ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Viruses are difficult to locate, but easy to trace back to the creator.

a. true b. false

Computer Science & Information Technology