//try-catch语块处理异常代码
public class H {
 public static void main(String[] args) {
  try{
  int a=14;
  int b=0;
  a=a/b;
  System.out.println("a的值为 :"+a);
  }catch(Exception e){
   e.printStackTrace();
  }
  System.out.println("program over"); 
 }
}
posted on 2019-04-11 21:43  刘煜炀  阅读(69)  评论(0编辑  收藏  举报