πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) Compiler error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
208
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
89%
Success Rate