Ask Question
14 June, 20:17

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

+2
Answers (1)
  1. 14 June, 23:57
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers