Java Chapter 6 UPDATED ACTUAL Exam Questions and
CORRECT Answers
A structure that allows repeated execution of a block of statements is a - loop
A loop that never ends is a(n) __________. - infinite
To construct a loop that works correctly, you should initialize a loop control _______ - Variable
What is the output of the following code?
b=1;
While (b<4)
System.out.print(b + " "); - d. 1 1 1 1 1 1...
What is the output of the following code?
b = 1;
while(b < 4)
{
System.out.print(b + " ");
b = b + 1;
} - b. 1 2 3
What is the output of the following code?
e = 1;
while(e < 4);
System.out.print(e + " "); - d. nothing
CORRECT Answers
A structure that allows repeated execution of a block of statements is a - loop
A loop that never ends is a(n) __________. - infinite
To construct a loop that works correctly, you should initialize a loop control _______ - Variable
What is the output of the following code?
b=1;
While (b<4)
System.out.print(b + " "); - d. 1 1 1 1 1 1...
What is the output of the following code?
b = 1;
while(b < 4)
{
System.out.print(b + " ");
b = b + 1;
} - b. 1 2 3
What is the output of the following code?
e = 1;
while(e < 4);
System.out.print(e + " "); - d. nothing