Back to Cosmos

Readme

code/languages/Java/Readme.md

latest804 B
Original Source

An Array List is a dynamic version of array. It is similar to Dynamic Array class where we do not need to predefine the size. The size of array list grows automatically as we keep on adding elements. In this article, we will focus on 2D array list in Java.

In short, it is defined as:

java
ArrayList<ArrayList<Integer> > arrLL = new ArrayList<ArrayList<Integer> >();

There are mainly two common variations of Array Lists, namely:

  • 1-D Array Lists (or commonly called Array Lists)
  • Multidimensional Array Lists

The most common and the simplest form of Multidimensional Array Lists used is 2-D Array Lists. In this article, we'll dive deeper into it, studying about its implementation, advantages and disadvantages.

Link to the article : https://iq.opengenus.org/2d-array-list-java/