五章异常 课件知识讲解.pptVIP

  • 3
  • 0
  • 约6.2千字
  • 约 21页
  • 2019-11-03 发布于天津
  • 举报
第五章 异 常  回顾 继承及其JAVA实现 多态及其JAVA实现 访问修饰符对类成员的访问限制 方法修饰符:static、final、abstract 目标 理解异常的概念 运用 try 块、catch 块和 finally 块处理异常 运用多重 catch 块处理异常 运用嵌套 try/catch 块处理异常 运用关键字 throw 和 throws 处理异常 运用JAVA编写和使用自定义异常 什么是异常? public class ExceptionRaised { public ExceptionRaised() { } public int calculate( int operand1, int operand2) { int result = operand1 / operand2; return result; } public static void main(String[] args) { ExceptionRaised obj = new ExceptionRaised(); int result = obj.calculate(9, 0); System.out.println(result); } } 异常情

文档评论(0)

1亿VIP精品文档

相关文档