swith([char||int]){
case states : do what?;[break;]
case states : do what?;[break;]
default :do what?;
}
例:
int i= 0;
switch(i){
case 1:System.out.println(1);break;
case 2:System.out.println(2);break;
default :System.out.println("default");
}
swith([char||int]){
case states : do what?;[break;]
case states : do what?;[break;]
default :do what?;
}
例:
int i= 0;
switch(i){
case 1:System.out.println(1);break;
case 2:System.out.println(2);break;
default :System.out.println("default");
}