πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) SHOW Method 2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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