Java Reference
In-Depth Information
The first thing to notice is that
helpOn( )
handles all possible I/O exceptions itself
and does not include a
throws
clause. By handling its own exceptions, it prevents
this burden from being passed on to all code that uses it. Thus, other code can simply
call
helpOn( )
without having to wrap that call in a
try
/
catch
block.