Skip to main content
1 of 2
The End
  • 709
  • 3
  • 20

I guess this thread might help you to understand the 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.

The End
  • 709
  • 3
  • 20