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
String animal = "GOAT";
switch(animal)
{
break: System.out.println("DOMESTIC");
}
You must be Logged in to update hint/solution