Java - assigning two expressions to a single variable simultaneously
<p>I've just finished my first year of Java and I've been looking at the JDK source code as an exercise.</p>

<p>I came across something I've never encountered before where there were two assignments to the same variable in the same statement.</p>

<p>e.g.</p>

<p><em>variable</em> = <em>expression</em> = <em>expression</em>;</p>

<p>What exactly is going on here? Is this a fairly common thing? What is the purpose of a double assignment?</p>

<p>Thanks a lot
-Mike</p>
