title: How to reverse an array without a loop or creating new array
body: <pre><code>class ReverseArrayElements1
  {
    public static void main ( String[] args )
    {
      int[] values = {10, 20, 30, 40}; 
      int temp;
  
       System.out.println( "Original Array: " + values[0] + "\n" + values[1] +
                           "\n" + values[2] + "\n" + values[3]   );
  
      // reverse the order of the numbers in the array
  
  
  
      System.out.println( "Reversed Array: " + values[0] + "\n" + values[1] + "\n"
                           + values[2] + "\n" + values[3] );
     }
  }
  </code></pre>
  
  <p>Task
  I need to complete the program so that the numbers in the array appear in reversed order. This does not mean that I can just need to display the elements in reverse order; I will actually move the last element in the array into the the first element of the array, and so on. I can't use a loop or create a new array. </p>
  
  <p>The output should be </p>
  
  <pre><code>Original Array: 10 20 30 40 
  Reversed Array: 40 30 20 10 
  </code></pre>