I like to count from
0 to
< length / 2. If it has an odd number of elements, you miss the middle element. If it has an even number, you stop at the middle. You do have to swap with
array[length - i - 1], however.
If you find that difficult to envisage, work it out with a pencil and paper.
Start by writing a swapElements method. Something like this
You should have that sort of method somewhere anyway, for general use for swapping pairs in arrays.