What will happen when you compile and run the following program?
public class X
{
public static void main(final String[] args)
{
final Object o1 = new Object();
final Object o2 = new Object();
switch (o1)
{
case o1:
System.out.println("o1");
case o2:
System.out.println("o2");
default:
System.out.println("default");
}
}
}
A) Error: "Missing break in switch block."
B) Error: "Incompatible types for switch."
C) Error: "Constructor Object() is declared protected."
D) Error: "Unused variable 'o2'."
E) Output: o1"
F) Output: o1 o2 default