A

Admin • 831.35K Points
Coach

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
  • Correct Answer - Option(A)
  • Views: 17
  • Filed under category Java
  • Hashtags:

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.

Be the first to start discuss.