Home > Articles > Programming > Java

  • Print
  • + Share This
Like this article? We recommend

The Java ArrayList

The ArrayList is a resizeable array implementation of the List interface. ArrayList implements all optional list operations, and allows for the storage of any object type, including null. ArrayList also provides methods to manipulate the size of the array that is used internally to store the underlying list. Every ArrayList instance has a given capacity—i.e., the size of the array used to store the elements in the list. Capacity is always at least as large as the list size. As elements are added to an ArrayList, its capacity grows automatically with no programmer input. This last point is the key to solving the above-mentioned problem of unconstrained database (or network) retrievals.

Let's have a look at an example of its use.

  • + Share This
  • 🔖 Save To Your Account