The following example shows how to use Arrays.copyOfRange API.
It copies the specified range of the specified array into a new array.
The initial index of the range (from) must lie between zero and original.length, inclusive
and end index (to) is the final index of the range to be copied, exclusive.