uppose that we have the following two dimensional array What

uppose that we have the following two dimensional array. What is the output of each of the followings?

int[][] num = { { 3, 2, -1, 3}, {-2, 4, 7, -3}, {9, 4, -1, 0},{2, 8, -3, 7 }};

System.out.println(num.length);
System.out.println(num[2].length);
System.out.println(num[3][0]);
System.out.println(num[2][3]);
System.out.println(num[0][3]);
System.out.println(num[2][2]);
System.out.println(num[0][0]);

Solution

Ooutput of each of the followings :-


System.out.println(num.length);   ----> 4
System.out.println(num[2].length); --->4
System.out.println(num[3][0]); ---------->2
System.out.println(num[2][3]); --------->0
System.out.println(num[0][3]); --------->3
System.out.println(num[2][2]); --------->-1
System.out.println(num[0][0]);----------->3

uppose that we have the following two dimensional array. What is the output of each of the followings? int[][] num = { { 3, 2, -1, 3}, {-2, 4, 7, -3}, {9, 4, -1

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site