Question: Java Programming 10th edition Joyce farrell 1. Which of the following method declarations is correct for a static method named computeSum() if the method receives

Java Programming 10th edition Joyce farrell

1. Which of the following method declarations is correct for a static method named computeSum() if the method receives two double arguments?

a. Public static double, double computeSum()

b. Public static void

computeSum(double a, double b)

c. Public int computeSum(double a, double b)

d. Public static int

computeSum(double a,b)

2. In the method header public static boolean(int age), age is a(n)____.

a. argument

b. parameter

c. return value

d. final value

3. If a method is written to receive an int parameter, and you pass a double to the method, then the method will _______.

a. Work correctly, the double will be promoted to an int

b. Work correctly, but the double might lose some data

c. Execute but issue a warning

d. Not work, an error message will be issued

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!