πŸ“Š JAVA
Q. What is the output of the below Java program with an empty return statement?
Code:
public class TestingMethods2
{
  void show()
  {
    System.out.println("SHOW Method..");
    return;
  }
  public static void main(String[] args)
  {
    TestingMethods2 t2 = new TestingMethods2();
    t2.show();
  }
}
  • (A) SHOW Method..
  • (B) No output
  • (C) Compiler error
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (A) SHOW Method..

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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