Hacker News new | ask | show | jobs
by johnisgood 617 days ago
I am not sure I understand. It seems very easy. You cannot directly remove an element from an array, you could create a new array that excludes that element. Arrays have a fixed size once declared, and I cannot imagine anyone who has written some code not knowing. :/
2 comments

I "have written some code" but it's been decades since I've done anything significant in Java in particular, and every language handles arrays (and/or data structures that get called "arrays") differently.
The terminology may be confusing, yes, although you would rather call them dynamic arrays or lists (like in Common Lisp). Plus you did say "decades", that is a long time nevertheless. I was not referring to people who have written some code decades ago, of course.
The point of my fake narrative was that failing to recall trivia about exactly which method to call is considered failure.

And btw, some arrays are fixed, but many languages call something an “array” which is dynamically-sized.