JavaCompilerCore/examples/achim/SwitchCase.jav

24 lines
318 B
Plaintext
Raw Permalink Normal View History

2013-10-18 11:33:46 +00:00
class SwitchCase{
test(){
i;
i=3;
switch (i){
case 1:
case 3:
case 5:
case 7:
case 9:
System.out.println("ungerade");
break;
case 2:
case 4:
case 6:
case 8:
System.out.println("gerade");
break;
default:
System.out.println("nicht im wertebereich");
break;
}
}
}