Java Control Statements
Java Control Statements - Important Points
16. | What is the output of the following program? public class Main { |
---|
A. 0 1 2 3 4
B. 1 2 3 4 5
C. 0 1 2 3 4 5
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
17. | What is the output of the following program? public class Main { |
---|
A. 2 4 6 8 10
B. 1 3 5 7 9
C. 2 4 6 8
D. 1 3 5 7
View Answer Discuss Work SpaceAnswer: option b
Explanation:
18. | What is the output of the following program? public class Main { |
---|
A. 0 1 2 3 4
B. 1 2 3 4 5
C. 0 1 2 3 4 5
D. The code will result in an infinite loop.
View Answer Discuss Work SpaceAnswer: option a
Explanation: