exswitch1.java

来自「java 教程源码」· Java 代码 · 共 27 行

JAVA
27
字号
//c3:ExSwitch1.java
// author:ZhangHongbin 
//This program is protected by copyright laws.
//Test switch sentence.  
public class ExSwitch1
{
	public static void main(String[] args)
	{
		
		char choice=67;
		switch(choice)
		{	
			case 'A':
			    System.out.println("choice=A");
				break;
			case 'B':
				System.out.println("choice=B");
				break;
			case 'C':
				System.out.println("choice=C");
				break;
			default:
				System.out.println("choice=default");

		}
	}
}

⌨️ 快捷键说明

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