Suppose that you have created a program with only the following variables. int x = 2; int

Question:

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);

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: