Home
MCQs
Java MCQs
Iterative Statements
Java MCQs

Java MCQs - Iterative Statements

Iteration is the process where statements are executed repeatedly for specified number and condition. Such statements are known as iterative statements

1. What is a loop statement?

A. An statement, which is executed repeatedly

B. An statement, which is executed once

C. An statement, which is never executed

D. None of above

Answer: A

2. What is empty loop in Java?

A. It has empty initialization clause

B. It has empty conditional clause

C. It has empty increment clause

D. All of above

Answer: D

3. What is nested loop?

A. A Loop with empty initialization

B. A Loop within a Loop

C. A Loop without condition

D. All of above

Answer: B

4. What will be the output of following program?

A. 0123456789

B. 02468

C. 0246810

D. 123456789

Answer: B

5. What is the correct output of this program ?

A. 10987654321

B. 987654321

C. 123456789

D. 12345678910

Answer: A

6. What is the correct output of following program?

A. Run time Error

B. Compile time error

C. 55 57 59 61 63 65 67 69

D. 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69

Answer: C

7. What is the correct output of this program ?

A. Run time Error

B. Compile time error

C. 70 69 68 67 66 65 64 63 62 61

D. 70 69 68 67 66 65 64 63 62

Answer: C

8. What is the correct output of this program ?

A. Run time Error

B. Compile time error

C. 0 1 2 3 4 5 6 7 8 9

D. 9 8 7 6 5 4 3 2 1 0

Answer: C

9. What is the correct output of this program ?

A. Run time Error

B. Compile time error

C. Hello Loop

D. Infinite Loop

Answer: D

10. What is the correct output of this program ?

A. It will print 10 times "Hello Loop"

B. Run time error

C. It will print 1 time "Hello Loop"

D. None of above

Answer: C