Ask Question
25 August, 15:20

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

+4
Answers (1)
  1. 25 August, 16:51
    0
    E. 7.0

    Explanation:

    the 7 of the out of the older and make a shame of waves and force of trying
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Show the printout of the following code. public class Test { public static void main (String[] args) { double[][] m = {{1, 2, 3}, {1.5, ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers