Q. What is the output of the below Java program?
Code:int persons = 45;
int random = 45;
switch(random)
{
case persons: System.out.print("CRICKET ");
default: System.out.println("RUGBY");
}
β
Correct Answer: (D)
Compiler error