cara menghapus array terakhir di java

int newArr[] = Arrays.copyOf(arr, arr.length - 1)
Marlon Sab-a