Question: Suppose that you have created a program with only the following variables. int a = 5; int b = 6; Suppose that you also have
Suppose that you have created a program with only the following variables.
int a = 5;
int b = 6;
Suppose that you also have a method with the following header:
public static void mathMethod(int a)
Which of the following method calls are legal?
a. MathMethod(a);
b. MathMethod(b);
c. MathMethod(a + b);
d. MathMethod(a, b);
e. MathMethod(2361);
f. MathMethod(12.78);
g. MathMethod(29987L);
h. MathMethod();
i. MathMethod(x);
j. MathMethod(a / b);
Step by Step Solution
3.39 Rating (171 Votes )
There are 3 Steps involved in it
a MathMethoda Legal b MathMethodb Legal c MathMethoda ... View full answer
Get step-by-step solutions from verified subject matter experts
