+ 1
Example of program using multidimensional array in java
Java Multidimensional Array
5 Respostas
+ 2
public class Program {
public static void main(String[] args) {
int[ ][ ] sample = { {1, 2, 3}, {4, 5, 6} };
int x = sample[1][0];
System.out.println(x);
}
}
/* complete this lesson for explanation
https://www.sololearn.com/learning/2149/
edit: hope it helps
https://www.programiz.com/java-programming/multidimensional-array
+ 2
class MultidimensionalArray
{
public static void main(String[] args)
{
int[][] a = { {1, 2, 3}, {4, 5, 6, 9}, {7}, };
System.out.println("Length of row 1: " + a[0].length);
System.out.println("Length of row 2: " + a[1].length);
System.out.println("Length of row 3: " + a[2].length);
}
}
+ 1
Thanks
+ 1
Thanks
0
You're welcome..