excep7.java

来自「该原代码为<Java编程基础、应用与实例>的附盘代码」· Java 代码 · 共 15 行

JAVA
15
字号
public class Excep7{
  static void go() throws NegativeArraySizeException{
    int[] a=new int[-1];
  }
  static void hi() throws NegativeArraySizeException{
    go();
  }
  public static void main(String[] args){
    try{
      hi();
    }catch(NegativeArraySizeException e){
      System.out.println("钢府辑 朝扼 吭匙..");
    }
  } 
}

⌨️ 快捷键说明

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