Question: 1. public class Test{ public static void main(String [] args) { p(4, 5.0); //a. . p(5.0, 4.0); //b. p(4.0, 5); //c. } public static double

1.

public class Test{

public static void main(String [] args) {

p(4, 5.0); //a. . p(5.0, 4.0); //b. p(4.0, 5); //c.

}

public static double p(int x, double y) { //1

statement;

}

public static double p(double x, double y) { //2

statement;

}

}

}

Identify the method invoked for a. //1 or //2?

A. 1

B. 2

2. All is true about overloading methods with the same name except:

A. parameter list must be the same

B. method name must be the same

C. parameter list must be different

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!