• 2021-04-14
    当编译并且运行下面程序时会出现什么结果?
    public class ThrowsDemo{
    static void throwMethod() {
    System.out.print("Inside throwMethod");
    throw new IOException("demo");
    }
    public static void main(String [] args){
    try{
    throwMethod();
    }catch(IOException e){
    System.out.println("Cauht"+e);
    }
    }
    }
  • 举一反三