• 2022-06-08
    在下列程序的下划线处,填入适当语句使程序能正确执行并输出异常栈信息。 public class ThrowableException{ public static void main(String args[]{ try{ throw new Throwable(“这里是本人定义的异常”); }catch(Throwable e){ System.out.println("Caught Throwable"); System.out.println("e.getMessage(): "+e.getMessage()); System.out.println("e.toString():"+e.toString()); System.out.println( "e.printStackTrace():"); 【 】;}}}
  • 举一反三