Copy Java array with System.arraycopy

System.arraycopy(Object src, int srcPos, Object dest, int destPos, int length) takes in an array object and copy it’s elements to the destination array object, you will need to specify the beginning position of the element for both the original array and the destination array which will be 0 if you wish to copy all the elements in an array starting from the beginning.

Read more