What the following part of the code will type:

int x = 0;
int y = 10;
do {
    y--;
    ++x;
} while (x < 5);
System.out.print(x + "," + y);
Explanation
Iterations
1: x=1 y=9
2: x=2 y=8
3: x=3 y=7
4: x=4 y=6
5: x=5 y=5 - loop exits

Следи за CodeGalaxy

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

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Java
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты