java program to delete last index in an array code example Example: java remove last array element Arrays.copyOf(original, original.length-1)