Given:
int x = 0;
int y = 10;
do {
y–;
++x;
} while (x < 5);
System.out.print(x + “,” + y);
What is the result?
A.
5,6
B.
5,5
C.
6,5
D.
6,6
Given:
int x = 0;
int y = 10;
do {
y–;
++x;
} while (x < 5);
System.out.print(x + “,” + y);
What is the result?
Given:
int x = 0;
int y = 10;
do {
y–;
++x;
} while (x < 5);
System.out.print(x + “,” + y);
What is the result?
A.
5,6
B.
5,5
C.
6,5
D.
6,6
The line of “y–;” should be “y–-;”.