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
πŸ’¬ Discuss
βœ… Correct Answer: (C) compile time error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
142
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Praveen Singh
Publisher
πŸ“ˆ
88%
Success Rate