Undefined Behavior Unlike C there is no undefined behavior in java. https://stackoverflow.com/questions/2201688/order-of-execution-of-parameters-guarantees-in-java https://stackoverflow.com/questions/17684991/difference-in-increment-decrement-operator-in-c-and-java