Question: If the following methods are declared in a class, which of them fail to compile because of overloading rules? public static int f 2 (

If the following methods are declared in a class, which of them fail to compile because of overloading rules?
public static int f2(int a, int b)//1
public static double f2(double a, int b)//2
public static double f2(int a, double b)//3
public static void f2(double a)//4
public static int f2(double b)//5
public static void f2(int a)//6
Your answer:
2,3,4,5 and 6
4,5 and 6
4 and 5
5 and 6

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!