Q. What is the output of the Java program below?
Code:
String college = "OXFORD";
switch("STANFORD")
{
case college: System.out.println("EXAM TIME"); break;
default: System.out.println("UNKNOWN");
}
β
Correct Answer: (D)
Compiler error