Does java support multi dimensional arrays ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between an inner class and a sub-class?

503


Give me an example of array and linked list? Where they can be used?

547


Can set contain duplicates?

538


How we can declare a static variable?

644


Are maps ordered java?

502






How do you delete a list in java?

524


What is package protected in java?

518


How do you ensure that n threads can access n resources without deadlock?

802


How to retrieve data from database in java using arraylist?

520


What do you understand by copy constructor in java?

486


How many types of operators are there?

513


what is the purpose of "virtual"?

562


What do you mean by an interface in java?

562


What does those terms actually mean included in the j.d.k i.6?

1595


How do you create immutable object in java?

533