Question: java question The UsingMethod class consists of a main method and a method called xMethod. Answer the following questions. (5 pnts) 1 public class UsingMethod
java question
The UsingMethod class consists of a main method and a method called xMethod. Answer the following questions. (5 pnts)
1 public class UsingMethod {
2 public static void main(String[] args) {
3 double z = xMethod(3.5, 5.5);
4 System.out.println(z);
5 }
6 public static double xMethod(double x, double y) {
7 return x + y;
8 }
9 }
1. What is the Return type of the main method? 2. What line invokes the xMethod? 3. What line is the Method Header for xMethod? 4. What line is the Method Body for xMethod? 5. What are the Modifiers for xMethod? 6. What is the Return Value Type for xMethod? 7. What is the Return Value for xMethod? 8. What is the Parameter List for xMethod? 9. What are the Actual Parameters (or Arguments) that are passed to xMethod? 10. What is the output of the code?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
