Check out example codes for "reverse array in java". It will help you in understanding the concepts better.

Code Example 1

int length = array.length;
		for(int i=0;i<length/2;i++) {
			int swap = array[i];
			array[i] = array[length-i-1];
			array[length-i-1] = swap;
		}
or
Collections.reverse(Arrays.asList(array));

Learn ReactJs, React Native from akashmittal.com