You cannot change the size of an array; adding or removing elements simply isn't possible. All you can do is overwrite elements. You may want to check out java.util.List; List looks like an array but you can change its size.
Note that depending on how you define "delete" you may be able to change the specific element to "0" or "null" or something like that. While the array still has 6 (or whatever) slots, only 5 will be filled. It's not too hard to then only return the 5 that still exist.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Aug 02, 2010
ahh but you can use the Array.remove (number) fuction? all i want is to swap the number with whatever number is entered. but i cant find the name of the variable holding the input Module.delete(input) input isn't working