how to delete the last item in a array java code example Example: java remove last array element Arrays.copyOf(original, original.length-1)