You should know the evaluation order of an expression.
this order is from left to right.
use your example:
1. int [ ] a = new int[ 2 ];
2. int b = 1;
3. a[b] = b = 0;
at line 3,first a[b] is evaluated.now b is 1,so a[b] is a[1].
now you can see it's a[1] that is being assighned a value.
hope this may clear your doubt.
Bin Zhao