R
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();
}
}
{
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 - Option(C)
- Views: 186
- Filed under category JAVA
Discusssion
Login to discuss.