How many times is the println statement executed?
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
System.out.println(i * j);
a. 100
b. 20
c. 10
d. 45
a The outer loop is executed 10 times for i from 0 to 9 and the inner loop is executed 10 times from j from 0 to 9 . So the print statement is executed 100 times. The correct answer is A.
Computer Science & Information Technology
You might also like to view...
What is a piece of advice for new technicians entering the PC repair field?
A) Wear a hat when working inside a computer. B) Bend at the knees when lifting a heavy component. C) Be careful when walking and carrying components. D) Carry a flashlight with you at all times.
Computer Science & Information Technology
The nine points inside the Transform Each dialog box are ____________________ points.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology