08210810633方杰第三次作业.docVIP

  • 11
  • 0
  • 约1.27千字
  • 约 4页
  • 2017-06-08 发布于重庆
  • 举报
08210810633方杰第三次作业

学生实验报告 课程: JAVA程序设计进阶~Java程序代码。 ExceptionExample.java package nn; class NoLowerLetter extends Exception // 类声明,声明一个Exception的子类NoLowerLetter public void print System.out.print # ; class NoDigit extends Exception // 类声明,声明一个Exception的子类NoDigit public void print System.out.print * ; class People void printLetter char c throws NoLowerLetter if c a||c z NoLowerLetter noLowerLetter new NoLowerLetter ; // 创建NoLowerLetter类型对象 throw noLowerLetter; // 抛出noLowerLetter else System.out.print c ; void printDigit char c throws NoDigit if c 1||c 9 NoDigit noDigit new NoDigit ; // 创建NoDigit

文档评论(0)

1亿VIP精品文档

相关文档