Font size:
Print
Question:

What will be the output of program?

int x=1, y=6;

while(y--) {

x++;

}

System.out.println("x="+x+"y="+y);


1. x=6 y=0
2. x=7 y=0
3. x=6 y=-1
4. Compilation error
Prev Question Members of a class specified as.......... are a...
Next Question Which of the following is not characteristic of...