Respuesta :
Answer:
Option 3 i.e., 7.3 is the correct answer to the following question.
Explanation:
In the following two dimensional array that is the double data type 2-D array variable "val" and it contains some float type information in the form of matrix that has 4 rows and 3 columns, In the following statement, they asked the value of 4th row and 2nd column and in the matrix 4th row and 2nd column contain the value i.e., 7.3.
Answer:
2) There is no such value.
Explanation:
since java uses 0 as the first digit of any value, the value vals[4][1] is calling the 5th and 2nd number of the 2D array. To get 7.1 the value needed would be vals[3][0]. 7.3 is vals[3][1], and 1.1 vals[0][0].
You can test this by doing,
System.out.println(vals[?][?]);
Where,
System.out.println(vals[4][1]);
Will give you an error because "There is no such value."