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

When will we prefer to use set and list in java and why?

550


What is the scope or life time of instance variables?

662


what is encapsulation in java? Explain

669


Which oo concept is achieved by using overloading and overriding?

542


How can we achieve thread safety in java?

691






What about static nested classes in java?

592


What is a parameter used for?

524


What is considered an anti pattern?

533


What is e java?

561


What is the difference between math floor and math round?

510


how to handle exceptions in ejb?

1882


What are benefits of java?

562


Is final static java?

553


why Interface used?

541


What do you mean by aggregation?

576