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

📄 app12_2.java

📁 是以下这本书的书上示例代码 书 名 JAVA2面向对象程序设计 页数 作 者 洪维恩 开本 责任编辑 字数 千字 出 版 社 中国铁道出版社 出版时间 2002年8月第1版 再版时间 2002年8月第
💻 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 + -