⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ifswitchtest.java

📁 递归子程序法:对应每个非终结符语法单元编一个独立的处理过程(或子程序)。语法分析从读入第一个单词开始
💻 JAVA
字号:
	/** 
	 * Java语言实验参考程序
	 * Company 北京师范大学计算机系 
	 * @author 孙一林
	 * @version 1.0
	 */
import java.io.*;public class IfSwitchTest {  public static void main(String[] args) throws IOException {    char c_Ch;    System.out.println("Input a Number:");    c_Ch = (char)System.in.read();    if(( 0x39 >= c_Ch ) && (c_Ch >= 0x30)){   // 判断0~9键      System.out.println("The Number is 0~9 Key ");      switch(c_Ch){                           // 0~9分支        case '0':System.out.println("The Number is 0 Key ");        break;        case '1':System.out.println("The Number is 1 Key ");        break;        case '2':System.out.println("The Number is 2 Key ");        break;        case '3':System.out.println("The Number is 3 Key ");        break;        case '4':System.out.println("The Number is 4 Key ");        break;        case '5':System.out.println("The Number is 5 Key ");        break;        case '6':System.out.println("The Number is 6 Key ");        break;        case '7':System.out.println("The Number is 7 Key ");        break;        case '8':System.out.println("The Number is 8 Key ");        break;        case '9':System.out.println("The Number is 9 Key ");        break;      }    }    else{      System.out.println("The Number is an Other Key ");    }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -