Java 1: 1) Which of the following would be a valid method call for the following
ID: 3864403 • Letter: J
Question
Java 1:
1)
Which of the following would be a valid method call for the following method?
public static void showProduct(double x, int y)
{
System.out.printf("%n%.0f * %d = %.0f", x, y, x * y);
}
showProduct(10.0, 4.6);
showProduct(10, 4.5);
showProduct("5", "40")
d. showProduct(3.3, 55);
2)
The _______________ identifies methods within a program and has an access specifier, a return type, a method name, and parentheses that can be empty or contain a parameter list.
stacking
stack overflow
string concatenation
divide and conquer
method header
a.showProduct(10.0, 4.6);
b.showProduct(10, 4.5);
c.showProduct("5", "40")
.d. showProduct(3.3, 55);
2)
The _______________ identifies methods within a program and has an access specifier, a return type, a method name, and parentheses that can be empty or contain a parameter list.
a.stacking
b.stack overflow
c.string concatenation
d.divide and conquer
e.method header
Explanation / Answer
Question 1:
Answer is : d. showProduct(3.3, 55);
Question 2:
Anwer is : e.method header
here totoal method has return type int , method name as total, parentheses contains parameter list
int total(int number)
{
// body
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.