<<< InputMismatchException example | Index | The finally Block >>> |
Multiple catch blocks are allowed:
try { } catch (ExceptionType name) { } catch (ExceptionType name) { }
For example,
try { } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); throw new SampleException(e); } catch (IOException e) { System.err.println("Caught IOException: " + e.getMessage()); }
<<< InputMismatchException example | Index | The finally Block >>> |