I haven\'t found anything with the specific needs of my function to do this, yes, it is for homework.
So I have:
public void reverseArray(int[] x) {
//We are just doing an operation here and calling a helper method.
public void reverseArray(int[] nums){
int[] hold = new int[nums.length]; //just so it will take this argument
int[] reversed = recurReverseArray(nums, hold, nums.length - 1, 0);
nums = reversed; //not returning just changing nums to be reversed.
}
public int[] recurReverseArray(int[] nums, int[] reverse, int end, int start){
if(end == 0 && start == nums.length - 1){
reverse[start] = nums[end];
return reverse; //the way out.
}
reverse[start] = nums[end];
return recurReverseArray(nums, reverse, end - 1, start + 1);
}