Does java support multi dimensional arrays ?

Answers were Sorted based on User's Feedback



Does java support multi dimensional arrays ?..

Answer / chandrarekha

Yes java supports multi dimensional arrays..care should be
taken while creating an array, as the array elements are
considered to be objects...we use new operator
int arr[][]=new int[3][]
arr[0]=new int[2];
arr[1]=new int[3];
arr[2]=new int[4];
the second dimension need not always have the same number
of elements.

Is This Answer Correct ?    11 Yes 3 No

Does java support multi dimensional arrays ?..

Answer / ashokmail.java@gmail.com

Yes . Java support multi dimensional arrays.

Example : int[][] i = {(1,2),(2,4)};

Is This Answer Correct ?    12 Yes 6 No

Does java support multi dimensional arrays ?..

Answer / santosh anand

The Java programming language does not really support multi-dimensional arrays. It does, however, support arrays of arrays. In Java, a two-dimensional array x is really an array of one-dimensional arrays:

int[][] x = new int[3][5];
The expression x[i] selects the one-dimensional array;
the expression x[i][j] selects the element from that array.

Is This Answer Correct ?    7 Yes 1 No

Does java support multi dimensional arrays ?..

Answer / ravikiran(aptech mumbai)

yes....

Is This Answer Correct ?    5 Yes 0 No

Does java support multi dimensional arrays ?..

Answer / sunil

yes


Example : int i[][] = {(3,4),(5,8)};

Is This Answer Correct ?    4 Yes 1 No

Does java support multi dimensional arrays ?..

Answer / jesi

java does not really support multidimensional array.it does however supports array of array.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is function overloading in java?

0 Answers   Tavant Technologies, TCS, Virtusa,


What is the purpose of the file class in java programming?

0 Answers  


What is tcp and udp?

0 Answers  


How are this and super used?

7 Answers   IBM,


Difference between local and global transaction ?

1 Answers   Accenture, iFlex,






what is an object and how do you allocate memory to it?

6 Answers   Anshinsoft, Wipro,


what is difference between abstract factory and factory design patterns?

0 Answers  


What is the use of volatile in java?

0 Answers  


What is use of super keyword?

0 Answers  


How to use Media tracker Class.

0 Answers  


What is java virtual machine and how it is considered in context of java’s platform independent feature?

0 Answers  


If an application has multiple classes in it, is it okay to have a main method in more than one class?

0 Answers  


Categories