A
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");
}
int random = 45;
switch(random)
{
case persons: System.out.print("CRICKET ");
default: System.out.println("RUGBY");
}
- Correct Answer - Option(D)
- Views: 19
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.