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();
}
}
β
Correct Answer: (C)
Compiler error