source:
https://coderanch.com/t/263903/java-programmer-SCJP/certification/loops class JMM119 {
public static void main (
String[] args) {
int i = 0, j = 9;
do {
if (j < 4) {break;} else if (j-- < 7) {continue;}
i++;
} while (i++ < 7);
System.out.print(i + "," + j);
}}
What is the result of attempting to compile and run the program?
a. Prints: 4,7
b. Prints: 6,6
c. Prints: 6,5
d. Prints: 6,4
e. Prints: 7,5
f. Prints: 8,4
g. Run-time error
h. Compile-time error
i. None of the above
output is:8,4.
here if continue statement is executed which is in the else-if block where the control will go after that?
is it go to if or else-if?
clear me...
[ November 06, 2008: Message edited by: Ganeshkumar cheekati ]