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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started