subject

Show the printout of the following code.

public class Test {
public static void main(String[] args) {
double[][] m = {{1, 2, 3}, {1.5, 2.5, 3.5}, {0.1, 0.1, 0.1}};
System. out. println(sum(m));
}

public static double sum(double[][] m) {
double sum = 0;

for (int i = 0; i < m. length; i++)
sum += m[i][i];

return sum;
}
}

A). 3
B). 4
C). 4.0
D). 3.6
E). 3.0

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
question
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
You know the right answer?
Show the printout of the following code.

public class Test {
public static void ma...
Questions
question
Mathematics, 21.07.2019 05:00
question
Mathematics, 21.07.2019 05:00
Questions on the website: 13722367