1.异常的概念
package cn.jxufe.java.chapter08.demo01; public class Test01ArithmeticException { public static void main(String[] args) { // TODO Auto-generated method stub division(30, 3); division(30, 0); } public static void division(int a, int b) { System.out.println("计算除法"); System.out.println("结果。。。" + a / b); } }
2.异常类