I guess this thread might help you to understand the evaluation order in java: What are the rules for evaluation order in Java?What are the rules for evaluation order in Java?
The most important part of this problem is that the first = is the actual assignment. In java the index is always evaluated befor the asignment, therefor a[a[b]] is the fist one in the evaluation order. And at this point a[b] is 0.