Операторы

Цикл while

1/20

Каким будет вывод следующей программы?

class Fork {
    public static void main(String[] args) {
        int x = 1, y = 6;
        while (y--) {
            x++;
        }
        System.out.println("x = " + x + " y = " + y);
    }
}
Comments