Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Array lists are created with an initial size. When this size is exceeded, the collection is automatically enlarged. When objects are removed, the array may be shrunk. Though, it may be slower than standard arrays but can be helpful in programs where lots of manipulation in the array is needed.

ArrayList Example

Let’s see the ArrayList example first then we will discuss it’s methods and their usage.

...