What is the outcome of the following code :
class Example14 {
public static void main(String[] args) {
int a = 1;
int b = 2;
outer: while (a < b) {
++a;
inner: do {
++b;
if (b % 3 == 0)
continue outer;
if (a % 3 == 1)
break outer;
System.out.println(a * b);
} while (b < a);
System.out.println(a+ b);
}
}
}
Given below a code ,which have one outer loop 'while' & one inner loop 'do ..while' .Find it's output :
1. compile error
2. 12
3. 12 7
4. 7
(3)
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.