Reputation: 79
I know that following similar thing is possible:-
Upvotes: 0
Views: 531
Reputation: 236004
Just assign the blank space to the position of the character you want to replace - it's not a real deletion, an array in Java is of fixed length (it can't be resized):
array[index] = ' ';
Upvotes: 1
Reputation: 305
You cannot delete an index from an array. This is because arrays have a fixed length that cannot be changed. If you want a list which you can delete elements, check out the ArrayList class. Here is the documentation: http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html
Upvotes: 1