public static void main(String[] args) { int x = 0, y = 0; x = 5 + y++; System.out.print(x + "" + y); x = 0; y = 0; x = 5 + ++y; System.out.print(x + "" + y); }
int x = 0, y = 0;
x = 5 + y++;
System.out.print(x + "" + y);
x = 0;
y = 0;
x = 5 + ++y;
}
at line 8 , increment y first and then do the arithmetic operation
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.