switch.java
来自「it is a good tool to help you study java」· Java 代码 · 共 27 行
JAVA
27 行
//An improved version of the season program
class Switch{
public static void main(String args[]){
int month=4;
String season;
switch (month){
case 12:
case 1:
case 2:
System.out.println("April is in the winter");break;
case 3:
case 4:
case 5:
System.out.println("April is in the spring");break;
case 6:
case 7:
case 8:
System.out.println("April is in the summer");break;
case 9:
case 10:
case 11:
System.out.println("April is in the Auturn");break;
default: System.out.println("Bonfus Month");
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?