This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Line1> int x = 10; Line2> int y = 20; Line3> int z = 15;
Line4> x = y++; // Values of x and y, AFTER the execution of this line of code: x=20, y=21 Line5> y = x++; // Values of y and x, AFTER the execution of this line of code: y=20, x=21 Line6> z = z++; // Value of x and y, AFTER the execution of this line of code: z=15
For lines 4 and 5, please note that when a postfix increment operator is used, the value of the variable is used before its value increments.
For line 6, the value of z will not change. Please refer to the following link for more information on this topic: