Does java support multi dimensional arrays ?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Answer / jesi
java does not really support multidimensional array.it does however supports array of array.
Is This Answer Correct ? | 2 Yes | 0 No |
Why is stringbuffer not immutable?
What are the principle concepts of oops?
What is a jagged array in java?
What is meant by throwing an Exception?
Explain the difference between call by refrence and call by value?
What is increment in java?
Are arrays immutable in java?
when a servlet sends request for first time it uses the follwing methods a)init b)doget() c)dopost() d)service
Can an interface implement another interface?
Name some OOPS Concepts in Java?
public class BatchTest { public static void main(String[] args) { Runtime run = Runtime.getRuntime(); try { Process p = run.exec("cmd start /c D:/test.bat"); System.out.println(p.exitValue()); } catch (Exception e) { e.printStackTrace(); } System.out.println("FINISHED"); } }
Does java vector allow null?