Which of the following would be a valid method call for the following method? pu
ID: 3537997 • Letter: W
Question
Which of the following would be a valid method call for the following method? public static void showProduct (int num1, double num2) { int product; product = num1 * (int)num2; System.out.println("The product is " + product); } Answer 1. showProduct(5.5, 4.0); 2. showProduct(10.0, 4); 3. showProduct(10, 4.5); 4. showProduct(33.0, 55.0); public static void showProduct (int num1, double num2) { int product; product = num1 * (int)num2; System.out.println("The product is " + product); } showProduct(5.5, 4.0); showProduct(10.0, 4); showProduct(10, 4.5); showProduct(33.0, 55.0); 1. showProduct(5.5, 4.0); 2. showProduct(10.0, 4); 3. showProduct(10, 4.5); 4. showProduct(33.0, 55.0);Explanation / Answer
3.showProduct(10, 4.5);
beacuse it has 10 int and 4.5 double
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.