Multidimensional arrays | Sololearn: Learn to code for FREE!

+1

Multidimensional arrays

How many arrays can the multidimensional array contain? I thought that the number of the square brackets(of the multidimensional array) is equal to the number of the arrays inside the multidimensional array? For example, int [][] multi = { {1,2,3,4}, {89}, {76,56} };.This two dimensional array contains three arrays,but how many arrays can it contain typically? And if it can contain more,what is the purpose of creating more dimensions when I can store three arrays in a two dimensional arrays(i.e. two square brackets)?

7/20/2021 9:14:00 AM

Dimitar Nikolov

4 Answers

New Answer