Vidyalelo
Java Programming · Q48

Overriding and Overloading

Programming · Java Programming · question 48

Q48

What will be the output of the following Java code? class A public void m1 (int i,float f) System.out.println(" int float method"); public void m1(float f,int i); System.out.println("float int method"); public static void main(String[]args) A a=new A(); a.m1(20,20);

A.
int float method
B.
float int method
C.
compile time error
Answer
D.
run time error

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board