摘要:
1.今天学习了用throws抛出异常。 示例: public class ThrowsDemo{ public static void main(String[] args)throws Exception{ int x=5; int y=x/0; System.out.println(y); } 阅读全文
摘要:
1.今天学习了异常处理。 用Try...catch...finally...: public class TryCatchFinally{ public static void main(String[] args){ try{ int x=5; int y=x/0; System.out.prin 阅读全文