What is the result of the program?

public class B {
    public static void main(String[] args) {
        big_loop:
        for (int i = 0; i < 3 ; i++) {
            try {
                for (int j = 0; j < 3 ; j++) {
                    if (i == j) continue;
                    else if (i > j) continue big_loop;
                    System.out.print("A");
                }
            } finally {
                System.out.print("B");
            }
            System.out.print("C");
        }
    }
}
Explanation
 
Begin the cycle i = 0;
__Entering thes econd cycle j = 0;
____ I.E. i == j (0 == 0), then continue to second cycle 
__Increment J, j = 1;
____ I.E. i & lt; j (0 == 2), both if are omitted, printing the "A"
__Inkrement J, j = 2;
____ Tk. i & lt; j (0 == 2), both if omitted, print the "A"
__Inkrement J, j = 3, the output of the cycle;
__Pechataem B of the finally block
With __Pechataem
Increment i, i = 1
__Vhodim Second cycle j = 0;
____ Tk. i & gt; j (1 & gt; 0), then continue big_loop;
____ NO! block finnaly done anyway! In this print of the B block finnaly
Jump to label big_loop
Increment i, i = 2
__Inkrement J, j = 1
____ Tk. i & gt; j (2 & gt; 1), then continue big_loop;
____ NO! block finnaly done anyway! In this print of the B block finnaly
Jump to label big_loop
Increment i, i = 3, Exit cycle.
The End.
As a result, the screen cherished AABCBB
 
                    

Мобильное приложение Beta

Get it on Google Play
или Подпишись на будущие тесты