Consider that you have two objects in memory somewhere. At Memory location 10000, you have OBJECT 1 (which is an array of ints containing 1, 2, 3, 4) and at Memory location 20000, you have OBJECT 2(which is an array of ints containing 2, 3, 1, 0) .
To begin with, the variable 'a' is pointing to OBJECT 1 and 'b' is pointing to OBJECT 2. This means, the value contained by variable a is 10000 and by variable b is 20000. (If you do not understand this statement that means, you first need to learn what is a reference Try
http://javadude.com/articles/passbyvalue.htm or
http://www.dickbaldwin.com/java/Java020.htm).
Now,
a[ (a = b) [3] ] is an expression. To find the value of this expression, JVM starts evaluating it from left.
1. It sees variable a pointing at OBJECT 1. The JVM makes a note of this fact. Think of this as JVM storing the value of ‘a’ i.e. the address of memory location 10000 in a temporary variable (T1). So now you have T1 pointing to the same object at memory location 10000.
2. Now, it sees (a=b)[3]. The variable ‘b’ contains the address 20000, which it assigns to a. So the value of a is now changed to 2000, which means, a is now pointing to the object at location 20000. Observe that T1 is still pointing to OBJECT 1.
3. Now, it sees [3]. So it applies [3] to whatever is pointed to by ‘a’, which Object 2 at memory location 2000. Thus, it figures out that the value of Object 2 [3] is actually 0. Thus, the value of expression (a=b)[3] is 0
4. So it applies 0 to the result of evaluation of Step 1, which is T1. T1[0] is 1.
HTH,
Paul.