CS 178 Programming with Multimedia Objects

Exceptions

For use during Lecture on October 27 , 2004 and Recitation on Friday Oct 28, 2004

What will you learn (in addition to what you already know about applets):

  • How to handle exceptions raised when an operation is performed.
  • try-catch block: File operations anf IOException
  • try-catch block: Data conversion and Num berFormatException.
  • try-catch-finally block.

File I/O with Exceptions (Source).

(Will work only if you compile and run on your computer. Guess why?)

Data Analysis Exceptions (Source).

Prepared by: Aditya Mathur, Oct 28 2004