1 //index 0 1 2 3 4
2int[] arr = {10, 20, 30, 40, 50};
3Arrays.copyOfRange(arr, 0, 2); // returns {10, 20}
4Arrays.copyOfRange(arr, 1, 4); // returns {20, 30, 40}
5Arrays.copyOfRange(arr, 2, arr.length); // returns {30, 40, 50} (length = 5)