Computer Science, asked by rayatsayeb, 9 months ago

how many ways you can set values for a two-dimensional integer array ?

Answers

Answered by Balarohith7brainly
1

Answer:

There are two ways to initialize a two Dimensional arrays during declaration. int disp[2][4] = { 10, 11, 12, 13, 14, 15, 16, 17}; Although both the above declarations are valid, I recommend you to use the first method as it is more readable, because you can visualize the rows and columns of 2d array in this method.

Answered by Nushrat109
0

Answer:

Declaring a two-dimensional array is very interesting in Java as Java programming language provides many ways to declare a 2D array and each one of them has some special things to learn about. For example, It's possible to create a two-dimensional array in Java without specifying the second dimension, sounds crazy right? but it's possible because a two-dimensional array in Java is nothing but an array of array. You can even create a two-dimensional array where each subarray has a different length or different type, also known as a heterogeneous array in Java. This means it's possible to create a two-dimensional array with variable column length in Java.

Explanation:

Hope it will help you

Plz follow me

Mark as brainlist

Similar questions