📄 app12_2.java
字号:
// app12_2,异常的处理
public class app12_2
{
public static void main(String args[])
{
try // 检查这个程序块的程序代码
{
int arr[]=new int[5];
arr[10]=7;
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("index out of bound!!");
}
finally // 这个块的程序代码一定会执行
{
System.out.println("this line is always executed!!");
}
System.out.println("end of main() method !!");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -