What is the output of the following 'for' loop code :
public class Example12 {
public static void main(String[] args) {
int a, b;
flag: for (a = 0; a < 6; a++) {
for (b = 5; b > 2; b--) {
if (a == b) {
System.out.print(" " + b);
continue flag;
}
}
}
}
}}
What is the output of the given below 'for' loop code :
1. 5
2. compile error
3. 5 4
4. 5 4 3
(4)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.