A

Admin • 832.70K Points
Coach

Q. What is the output of the below Java program with a void method?

Code:
public class TestingMethods3
{
void show2()
{
System.out.println("SHOW Method 2");
}
public static void main(String[] args)
{
TestingMethods3 t3 = new TestingMethods3();
t3.show2();
}
}
  • (A) SHOW Method 2
  • (B) No output
  • (C) Compiler error
  • (D) None
  • Correct Answer - Option(A)
  • Views: 18
  • 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.