This is an answer code for a problem of codingbat; http://codingbat.com/prob/p112409
public int[] reverse3(int[] nums) {
int[] numsRev = new int[nums.length];
int j = nums.length-1;
for(int i = 0; i <= nums.length-1; i++){
numsRev[i] = nums[j];
j--;
}
return numsRev;
}