Original Post
I'm trying to figure out how I can remove an element from a normal array (not ArrayList) in Java. I tried by just setting the array at the particular index to null, but that's apparently not what he wanted.
My only other guess is maybe try to create a new array, use arraycopy from starting at 0 until one less than the element being removed, and then then copying the same array from one element after the one being used to the end of the array you just created.
Then reference the old array to the new array and end the method.
Any thoughts?
My only other guess is maybe try to create a new array, use arraycopy from starting at 0 until one less than the element being removed, and then then copying the same array from one element after the one being used to the end of the array you just created.
Then reference the old array to the new array and end the method.
Any thoughts?