Skip to main content
Copy edited.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

youYou can create them just the way others have mentioned. oneOne more point to add, you: You can even create a skewed 2 dimensionaltwo-dimensional array with each row, not necessarily having the same number of collumns, like this:

int array[][]=newarray[][] = new int[3][];
array[0]=newarray[0] = new int[3];
array[1]=newarray[1] = new int[2];
array[2]=newarray[2] = new int[5];

you can create them just the way others have mentioned. one more point to add, you can even create a skewed 2 dimensional array with each row not necessarily having the same number of collumns, like this:

int array[][]=new int[3][];
array[0]=new int[3];
array[1]=new int[2];
array[2]=new int[5];

You can create them just the way others have mentioned. One more point to add: You can even create a skewed two-dimensional array with each row, not necessarily having the same number of collumns, like this:

int array[][] = new int[3][];
array[0] = new int[3];
array[1] = new int[2];
array[2] = new int[5];
Source Link
Victor Mukherjee
  • 11.3k
  • 19
  • 61
  • 104

you can create them just the way others have mentioned. one more point to add, you can even create a skewed 2 dimensional array with each row not necessarily having the same number of collumns, like this:

int array[][]=new int[3][];
array[0]=new int[3];
array[1]=new int[2];
array[2]=new int[5];