previous | start | next

## Declaring Checked Exceptions

- Example: Opening a file may throw `FileNotFoundException`:

      public void read(String filename) throws FileNotFoundException

      {

         FileReader reader = new FileReader(filename);

         . . .

      }

- Can declare multiple exceptions

      public void read(String filename)

       throws IOException, ClassNotFoundException

      public static void main(String[] args)

         throws IOException, ClassNotFoundException

previous | start | next