Jagged Arrays extra information added (#27115)

pull/28112/head^2
Burak İkan Yıldız 2019-01-21 18:18:33 +03:00 committed by Christopher McCormack
parent 93c608beb0
commit 11968cf6e7
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ In a similar manner, one can declare an array of as many dimensions as desired,
Tip: Arrays like this can be quite confusing, especially to beginners, so if you are planning to use this, be prepared to make a visual representation either in your head or on pen and paper.
### Jagged Arrays
Jagged arrays are multi-dimensional arrays that have a set number of rows but a varying number of columns. Jagged arrays are used to conserve memory use of the array. Here is an example:
Jagged arrays are multi-dimensional arrays that have a set number of rows but a varying number of columns. Jagged arrays are used to conserve memory use of the array. They can be thought of as arrays which holds arrays. Here is an example:
```java
int[][] array = new int[5][]; //initialize a 2D array with 5 rows