A

Admin • 828.03K Points
Coach

Q. What is the output of the below Java program with a SWITCH statement?

Code:
int points=6;
switch(points)
{
case 6: ;
case 7: System.out.println("PASS");break;
case 8: ;
case 9: System.out.println("Excellent");break;
case 10: System.out.println("Outstanding"); break;
default: System.out.println("FAIL");
}
  • (A) PASS
  • (B) Excellent
  • (C) Outstanding
  • (D) FAIL
  • Correct Answer - Option(A)
  • Views: 24
  • 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.