Array reverse algorithim - reversing elements
Hi everyone. Thanks in advance for everyone who created this forum!
I am a student in a java learners class, and I wanted some feedback on some work that I am doing in school. (not the answer, but some pointers)
The homework is I have to construct a method that will reverse the elements in an array of integers. For efficiency purposes, this method will not create another array in the process of the reversing.
This is my code so far, but my issue is that while I am using a " for " loop for counting int  a backwards, I am not initializing the elements.....
Code so far is :
public static void reverse(int a)
if (a == null)
throw new IllegalArgumentException("null array");
for( int i = a.length; i > 0 ; i --)
// this is the tough part of the code,
// as I cannot create another array to put
//the reverse order in.