Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:30, Arealbot
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
image
Computers and Technology, 23.06.2019 21:40, minnie7760
Draw the resistor’s voltage and current phasors at t=15ms. draw the vectors with their tails at the origin. the orientation of your vectors will be graded. the exact length of your vectors will not be graded.
Answers: 2
image
Computers and Technology, 24.06.2019 08:00, qveenvslayin
How can smart devices benefit businesses, organizations, and social communities in the global marketplace?
Answers: 1
image
Computers and Technology, 24.06.2019 16:30, kjhgfcvb5761
The database design steps are listed below in the incorrect order. choose the correct order number next to each step. determine the information to be stored in the database. determine the fields needed to record the data determine if there will be any repetition of data entered, and separate the fields into tables to normalize the data. create relationships to connect the tables.
Answers: 3
Do you know the correct answer?
Show the printout of the following code.

public class Test {
public static void ma...

Questions in other subjects:

Konu
Mathematics, 20.04.2020 23:05
Konu
Mathematics, 20.04.2020 23:05
Konu
Biology, 20.04.2020 23:05