class Test { int x = 50; int y = 100; public static void main (String[] args) { int x = 0; int y = 10; while(x<3){ x++; y--; } System.out.println("x= "+ x + "y= " + y); } }
Standard input is empty
x= 3y= 7
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!