R

Ram Sharma • 193.88K Points
Coach

Q. What is the output of the below Java program?

Code:
public class MethodOverloading2
{
int info()
{
System.out.println("PLANE");
return 0;
}

void info()
{
System.out.println("AIRPORT");
}

public static void main(String[] args)
{
MethodOverloading2 m = new MethodOverloading2();
int a = m.info();
}
}
  • (A) PLANE
  • (B) AIRPORT
  • (C) Compiler error
  • (D) None
  • Correct Answer - Option(C)
  • Views: 186
  • Filed under category JAVA

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.


Question analytics