ok ,explanation for this is here,shown below may be it helps you to some extent.
Evaluation Order
In
Java, the order of evaluation of operands in an expression is fixed. All operands are evaluated from left to right. The order of execution of the operations may be completely different. For example:
int [] a = {5, 5};
int b = 1;
a[b] = b = 10;
In this example, on line 3 the a[b] operand is evaluated to a[1] because at that moment b equaled 1. Next b is evaluated to 1 again. Finally, 10 is evaluated simply as the constant 10. After the operands are evaluated, the assignment operations take place. Assignment is a right to left operation, so b is assigned 10 and then a[1] is assigned the value of b, which is 10.