reverse
Reverses elements of the array in the specified range in-place.
Parameters
fromIndex
- the start of the range (inclusive) to reverse.
toIndex
- the end of the range (exclusive) to reverse.
Exceptions
IndexOutOfBoundsException
- if fromIndex is less than zero or toIndex is greater than the size of this array.
IllegalArgumentException
- if fromIndex is greater than toIndex.