Which of the following statements are correct to invoke the printMax method in Listing 7.5 in the textbook?
a. printMax(1, 2, 2, 1, 4);
b. printMax(new double[]{1, 2, 3});
c. printMax(1.0, 2.0, 2.0, 1.0, 4.0);
d. printMax(new int[]{1, 2, 3});
a. printMax(1, 2, 2, 1, 4);
b. printMax(new double[]{1, 2, 3});
c. printMax(1.0, 2.0, 2.0, 1.0, 4.0);
The last one printMax(new int[]{1, 2, 3}); is incorrect, because the array must of the double[] type.
Computer Science & Information Technology
You might also like to view...
Which of the following is an example of an escape sequence?
A) \n B) {...} C) += D) ==
Computer Science & Information Technology
A duplexing assembly allows a printer to print on both sides of the paper without human intervention
Indicate whether the statement is true or false
Computer Science & Information Technology