An Array is a continuous memory allocation of the group of like-typed variables that are referred to by a common name. In this article, we have focused on 2D array in Java which is a variant of the usual 1D array by introducing a new dimension.
In short, it is defined as:
int[][] arr = new int[10][20]; // Other methods further in this // article at OpenGenus
For example, for storing 10 integers, 40 bytes of continuous memory space is allocated for storing these integers in the form of an...
Published on May 09, 2020 09:16