title: Creating a New Reverse Java Array
body: <p><a href="http://codingbat.com/prob/p112409" rel="nofollow noreferrer"><code>CodingBat &gt; Java &gt; Array-1 &gt; reverse3</code></a>:</p>
  
  <blockquote>
    <p>Given an array of ints length 3, return a new array with the elements in reverse order, so {1, 2, 3} becomes {3, 2, 1}. </p>
  </blockquote>
  
  <pre><code>public int[] reverse3(int[] nums) {
      int[] values = new int[3];
      for (int i = 0; i &lt;= nums.length - 1; i++) {
          for (int j = nums.length-1; j &gt;= 0; j--) {
              values[i] = nums[j];
          }
      }
      return values;
  }
  </code></pre>
  
  <p>I can't get this to work properly, usually the last int in the array, becomes every single int in the new array</p>