home *** CD-ROM | disk | FTP | other *** search
/ Java Certification Exam Guide / McGrawwHill-JavaCertificationExamGuide.iso / pc / Web Links and Code / rev / chap8 / q9.java < prev   
Encoding:
Java Source  |  1997-05-08  |  329 b   |  18 lines

  1. class C extends B {
  2.  
  3.    public static void main(String[] args) {
  4.       C c = new C();
  5.       c.test(args);
  6.    }
  7.  
  8.    void method(String s) throws AnotherException {
  9.       if (s.equals("yes"))
  10.          throw new AnotherException();
  11.       else
  12.          return;
  13.    }
  14. }
  15.  
  16. class AnotherException extends MyException {
  17. }
  18.