class Test{
public static void main(String args[]){
int k = 9, s = 5;
switch(k){
default :
if( k == 10) { s = s*2; }
else{ s = s+4;
break; }
case 7 : s = s+3;
}
System.out.println(s);
}
}
Possible answers: 5 - 9 - 12 - It won't compile.
The correct answer is 9, but I marked 12 because I thought keyword break finished 'else' block but not 'default' block. So, if I will write for example:
default:
if(true){
if(true){
if(true){
if(true){
s=0;
break; <- do this Break finish default case too?
}}}}
s=12345; <- is this Dead code?
Thank you so much¡
