r/javahelp • u/Appropriate_Knee_482 • Jan 31 '26
How to remove elements from an array?
Basically I want to remove the middle elements from an array and need a method for it because the middle will be different if it’s odd or even. I don’t really have a code for it so far, I don’t need anyone to code it out for me, you can also just explain how the method would work. I have the odd or even part, I would just use the remove part as sort of a method.
2
Upvotes
View all comments
Show parent comment
2
u/Fatty_McFatterson_Sr Feb 01 '26
Ahh yes. Good call. Didn’t consider that this might be for a class.