copying array by value in java
<p>I tried to make an independent copy of an array but couldnt get one. see i cannot copy it integer by integer using a for loop because of efficiency reasons. Is there any other way?
This was my code:</p>

<pre><code>int[] temp = new int[arr.length]; 
temp = arr; 
</code></pre>
