(With or without a break at end of the prior case)
public class X {
public static void main(String [] args) {
Object [] o = args;
switch (10) {
case Integer i:
System.out.println("i = " + i);
default:
System.out.println("Unreachable");
break;
}
}
}
this code fails to elicit a diagnostic about unreachable default clause.
public class X {
public static void main(String [] args) {
Object [] o = args;
switch (10) {
case Integer i:
System.out.println("i = " + i);
default:
System.out.println("Unreachable");
break;
}
}
}
this code fails to elicit a diagnostic about unreachable default clause.