Interesting..! Let me try.
The expression (a = b), assigns b to a and returns a reference to an int array. Let's call it x. Then you can write the whole
expression as a[x[3]]. x[3] is 0, since it is the fourth element in the array b. So the expression becomes a[0], which is 1 and that's what being printed. But, if you try to print a[0] after the println statement, it will print 2, because the array that
was referenced by a before the assignment is no longer accessible - a and b both point to the same array which b was referencing.
HTH
------------------
Velmurugan Periasamy
Sun Certified
Java Programmer
----------------------
Study notes for Sun Java Certification
http://www.geocities.com/velmurugan_p/
------------------------------------------------------------------------------------<BR>Velmurugan Periasamy<BR>Sun Certified Java Programmer for Java 2 Platform<BR>Sun Certified Web Component Developer for J2EE platform<BR>Sybase Certified EAServer Developer (similar to jCert level 3)<BR>------------------------------------------------------------------------------------<BR>Study notes for Sun Java Certification<BR><A HREF="http://www.geocities.com/velmurugan_p/" TARGET=_blank rel="nofollow">http://www.geocities.com/velmurugan_p/</A><BR>------------------------------------------------------------------------------------