0
Array length
Is there a way to make an array that just adds/subtracts from its length whenever a number is added/removed?
1 Odpowiedź
+ 2
In java, there is ArrayList which does exactly what you want.
They are created with initial size, but when this size is exceeded, the collection is automatically enlarged. When objects are removed, the ArrayList may shrink in size.