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 a key in java?

753


Is void a wrapper class?

745


What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?

842


What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

892


How do you define a variable?

745


What is arraylist e in java?

760


What is the difference between static and non-static variables in java programming?

731


Can an interface have a class?

781


What is the independent variable in an experiment?

759


What are the advantages of passing this into a method instead of the current class object itself?

1430


What are local variables?

826


What are some characteristics of interference class?

779


design an lru cache in java?

773


When will we use them?

820


Why java is object oriented?

806