A

Admin • 828.03K Points
Coach

Q. 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
  • (D) run time error
  • Correct Answer - Option(C)
  • Views: 15
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.