The Increment and Decrement Operators
If sum contains 25, then the statement
System.out.println (sum++ + " " + ++sum +
" " + sum + " " + sum--);
prints the following result:
25 27 27 27
and sum contains 26 after the line is complete
Previous slide
Next slide
Back to first slide
View graphic version