title: Reverse Array Order
body: <p>I am trying to reverse the order of an Array in java.<br>
  What is the most efficient way to do so in O(n) with the least amount of memory used.<br>
  No need to answer with code, pseudo code will be fine.<br>
  Here is my thought process:</p>
  
  <pre><code>  create a new temp array //I think this is a waste of memory, 
                            //but I am not sure if there's a better way
   grab elements from the end of the original array -decrement this variable
   insert element in beginning of temp array -increment this variable
  then make the original array point to the temp array? //I am not sure 
              //if I can do this in java; so let's say the 
              //original array is Object[] arr; and the temp array is 
              //Object[] temp. Can I do temp = arr; ?
  </code></pre>
  
  <p>Is there a better more efficient way to do this perhaps without using a temp array?
  and Lastly, assume that there are no nulls in the array, so everything can work.
  Thank you</p>
  
  <p>Edit: no this is not homework.</p>