Каким будет вывод следующей программы?
class Fork { public static void main(String[] args) { int x = 1, y = 6; while (y--) { x++; } System.out.println("x = " + x + " y = " + y); } }
x = 6 y = -1
x = 7 y = 0
x = 6 y = 0
Ошибка компиляции.
Please log in or register to have a possibility to add comment.
Please log in or register to have a possibility to add comment.