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