Apart from the fact that your code wouldn't compile … it is always
left‑to‑right, taking the associativity and precedences of all operators into consideration. Tne
Java Language Specification link I gave you shows some unusual cases which explain the outputs.