Java编程思想学习笔记(二)Java编程思想学习笔记(二)???public class InheritingExceptions {public void f
Java编程思想学习笔记(二)
Java编程思想学习笔记(二)
?
?
?
public class InheritingExceptions { public void f() throws SimpleException { System.out.println("异常"); throw new SimpleException(); } public static void main(String[] args) { InheritingExceptions sed = new InheritingExceptions(); try { sed.f(); } catch (SimpleException e) { System.out.println("Caught it"); } }}class SimpleException extends Exception {}
?
?
???