Populate Java Array
<p>I have an array with a user defined size of "a"</p>

<p>Once my user inputs all the data, I want to be able to execute a XOR operation on all the values the user has entered. </p>

<p>By adapting code; </p>

<pre><code>int k=1;     
for (int k=0;k&lt;A;k++){
k = ^piles[k];
</code></pre>

<p>*This code is in a loop statement.
I'm presuming its multiplying my value (once it runs the XOR operator) by 1 which is giving me the wrong value. Any thoughts?</p>
