第5章-异常处理的.pptVIP

  • 1
  • 0
  • 约8.74千字
  • 约 40页
  • 2017-10-13 发布于浙江
  • 举报
第5章-异常处理的

例外类的使用 FileInputStream 的API public FileInputStream(String name) throws FileNotFoundException 例外示例 import java.io.*; class ExceptionDemo1{ public static void main( String args[ ] ){ FileInputStream fis = new FileInputStream( text ); …… } } 例外类的使用 积极处理方式: import java.io.*; class ExceptionDemo1{ public static void main( String args[ ] ){ try{ FileInputStream fis = new FileInputStream( text ); } catch(FileNotFoundException e) { ……} …… } } 例外类的使用 消极处理方式: import java.io.*; class ExceptionDemo1{ public static void main( String args[ ]

文档评论(0)

1亿VIP精品文档

相关文档