Lecture overview -- Keyboard shortcut: 'u'  Previous page: Raising an exception in an exception handler -- Keyboard shortcut: 'p'  Next page: Recommendations about exception handling [Section] -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Exception Handling - slide 27 : 30

Comparison with exception handling in Java
The catch or specify principle: A method either catches and handles an exception, or it specifies that it may throw the exception
CatchOrSpecifyDemo0.java
A Java program - does not compile.
CatchOrSpecifyDemo1.java
A Java program - main handles Problem.
CatchOrSpecifyDemo2.java
A Java program - main specifies Problem.