Rethrowing Exceptions : throw « Statements « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Statements » throw 
5.12.2.Rethrowing Exceptions
import java.io.FileNotFoundException;

public class MainClass {
  public static void main(String[] argvthrows Exception {
    try {
      throw new FileNotFoundException("");
    catch (FileNotFoundException ex) {
      System.out.println("book list not found!");
      throw ex;
    }

  }
}
5.12.throw
5.12.1.Throwing Exceptions
5.12.2.Rethrowing Exceptions
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.