📄 finallydemo.java
字号:
public class FinallyDemo {
public static void main( String[] args ) {
try {
method();
}
catch (Exception e) {
System.out.print( 'e' );
}
System.out.print( 'f' );
}
static void method() {
try {
createException();
System.out.print( 'a' );
}
catch ( ArithmeticException e ) {
System.out.print( 'b' );
}
finally {
System.out.print( 'c' );
}
System.out.print( 'd' );
}
static void createException() {
throw new ArrayIndexOutOfBoundsException();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -