java的异常处理 exception.pptVIP

  • 0
  • 0
  • 约6.36千字
  • 约 21页
  • 2018-01-18 发布于河南
  • 举报
java的异常处理 exception

* * * * * * * * T12 异常 回顾 区分 Java 应用程序和 Java Applet Applet 的生命周期 如何将参数传递给 Applet 如何在 Applet中插入多媒体文件 * 目标 异常的概念 运用 try 、catch 和 finally 处理异常 throw 和 throws 编写和使用自定义异常 * 什么是异常? * 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精品文档

相关文档