Home / Programming MCQs / JAVA MCQs / Question

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

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.