answersLogoWhite

0

All arrays are one-dimensional. A two-dimensional array is simply a one-dimensional array of one-dimensional arrays:

int a[2][3];

This is an array of 2 elements where each element is itself an array of 3 integers. In other words it is an array of 6 integers. The two dimensions simply allow us to split the array into two sub-arrays of 3 elements each.

User Avatar

Wiki User

8y ago

What else can I help you with?

Related Questions

How does one initialize a byte array in Java?

One can get information about how to initialize a byte array in java on the website stackoverflow dot com. That website can learn one a lot about java.


Difference between 1D array and 2D arrays?

1d array contains single row and multiple columns and 2d array contains multiple row and multiple columns. 2d array is a collection of 1d array placed one below another,while 1d array is simple a collection of elements.


Flow chart of multiplication of 2d array?

algorithm & flowchrt of 2d matrices


Which condition is not necessary in dynamic stack?

in dynamic stack we don't have to initialize the size of array while in static stack we have 2 initialize it ......


How you can initialize an array with data values during declaration?

int myArray[] = {1,2,3,4,5};


Which Array tasks are recommended when replacing a hard drive?

Initialize and remove dead segments


Declare and initialize 2D array in java using two statements- one to declare variable the other to initialize elements?

I'm not sure what you're asking. Do you mean when you declare/instantiate an array like this? int[][] arr; arr = {{1, 2, 3},{4, 5, 6}}; I think that's right. *********************************** THIS IS INCORRECT because you can assign constant values to array only at time of initialization. Therefore above code will throw an error. Correct way is: int[][] arr = {{1, 2, 3},{4, 5, 6}}; thanx .. itsabhinav123@gmail.com


Is there any overhead issues if you make a 2D array arr28 rather than making a 1D array arr16 of size 16 Any memory issues or execution differences between the two?

2D array of size 2x8 and 1D array of size 16


Why can't we increment an array like a pointer?

once we initialize the array variable, the pointer points base address only & it's fixed and constant pointer


Subtraction of 2d array in java?

looda le lo mera


What is the default value of the array elements in an integer array?

'0' Try this: public static void main(String[] args){ } The output would be 0 even though you did not initialize any value in the int array.


What is Jagged Array in C?

A Jagged array is an array of arrays. You can initialize a jagged array as − int[][] scores = new int[2][]{new int[]{92,93,94},new int[]{85,66,87,88}}; Where, scores is an array of two arrays of integers - scores[0] is an array of 3 integers and scores[1] is an array of 4 integers.