Q. What is the output of the Java program below?
Code:
String animal = "GOAT";
switch(animal)
{
break: System.out.println("DOMESTIC");
}
β
Correct Answer: (D)
Compiler error