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

1 Expert Approved Answer
Step: 1 Unlock

a Legal b Legal c ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!