It is not guaranteed that an increment or decrement is performed immediately after giving up the previous value and before any other part of the expression is evaluated. It is merely guaranteed that the update will be performed sometime before the expression is considered "finished".
So, using of increments or decrements 1 at a time gives accurate result. But if used collectively, the compiler itself choses the increment or decrement to be performed and gives you a messy result. :P
I think it would help you...i posted same reply in that post also.. :D
public class GrossmontBank
//class variables (global - accessible throughout this class)
//scanner object to be used throughout
private static Scanner input = new Scanner(System.in);