A

Admin • 832.27K Points
Coach

Q. What is the output of the below Java program?

Code:
int hours = 10;
switch(hours)
{
case 10: System.out.println("TEN");break;
case 10: System.out.println("TEN AGAIN"); break;
default: System.out.println("TEN AS USUAL");
}
  • (A) TEN
  • (B) TEN AGAIN
  • (C) TEN AS USUAL
  • (D) Compiler error
  • Correct Answer - Option(D)
  • Views: 22
  • 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.