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

1 Expert Approved Answer
Step: 1 Unlock

a MathMethoda Legal b MathMethodb Legal c MathMethoda ... 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 8th Questions!