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

Code:
switch(15)
{
  case 5*2: System.out.println("TEN");break;
  case 5*4-5:System.out.println("FIFTEEN");break;
  case 60/4+5: System.out.println("TWENTY");
}
  • (A) TEN
  • (B) FIFTEEN
  • (C) TWENTY
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) FIFTEEN

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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