Why is this statement not working in java x ^= y ^= x ^= y;
<pre><code>int x=1;
int y=2;
x ^= y ^= x ^= y;
</code></pre>

<p>I am expecting the values to be swapped.But it gives x=0 and y=1.
when i tried in C language it gives the correct result.</p>
