What is the purpose of the following code segment?
int[] newArray = Arrays.copyOf(oldArray, oldArray.length);
Checks if oldArray is empty
oldArray
Reverses the order of elements in oldArray
Deletes all elements in oldArray
Creates a new array with the same elements as oldArray