1
visibility
switch (opn) { case 'a': System.out.println("Platform Independent"); break; case 'b': System.out.println("Object Oriented"); case 'c': System.out.println("Robust and Secure"); break; default: System.out.println("Wrong Input"); }
When opn = ‘b’
Object Oriented Robust and Secure
Error : break missing
Object Oriented
none
case 'b' is matched, "Object Oriented" gets printed to the console. As there is no case statement in case 'b', program control falls through to case 'c' printing "Robust and Secure" to the console. case 'c' has a break statement which transfers the program control outside switch statement.