posted 21 years ago
The FileInputStream constructor taking a File object as argument is declared to throw FileNotFoundException (checked) and SecurityException (unchecked) (see API). Since FileNotFoundException extends IOException which in turn extends Exception, it is said to be a checked exception and you have to catch it somehow or throw it further. The compiler knows that all subclasses of Exception that are not subclasses of RuntimeException are checked exception and it can therefore enforce some of its rules. You are not required to catch SecurityException since it is unchecked.
[ January 23, 2003: Message edited by: Valentin Crettaz ]