ex070102.java

来自「我在学习JAVA的讲义」· Java 代码 · 共 25 行

JAVA
25
字号
class Test{	
	static void m1(){
		try{
			throw new ArithmeticException();
		}catch(ArithmeticException e){
			try{
				throw new ArithmeticException();
			}catch(ArithmeticException e1){
				throw new ArrayIndexOutOfBoundsException("demo");
			}catch(ArrayIndexOutOfBoundsException e1){
				System.out.println("Caught "+e+" in AAA");
			}
		}catch(ArrayIndexOutOfBoundsException e){
				System.out.println("caught "+e+" in BBB");
			}
		}
		public static void main(String args[]){
			try{
				m1();
			}catch(RuntimeException e){
				System.out.println("caught "+e+" in CCC");
			}
		}
}

⌨️ 快捷键说明

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