h3.Error Handling Code Samples
The Java programming language provides a flexible error handling model.
* [ListOfNumbers.java|http://java.sun.com/docs/books/tutorial/essential/exceptions/examples/ListOfNumbers.java] shows how to use a try and catch block to catch exceptions. For supporting information see [The Java Tutorial: Handling Errors Using Exceptions|http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html].
* ListOfNumbersWOHandler.java demonstrates how the compiler handles runtime and checked exceptions differently. A program must handle checked exceptions, but does not have to handle runtime exceptions. For supporting information see [The Java Tutorial: Handling Errors Using Exceptions|http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html].
----
The Java programming language provides a flexible error handling model.
* [ListOfNumbers.java|http://java.sun.com/docs/books/tutorial/essential/exceptions/examples/ListOfNumbers.java] shows how to use a try and catch block to catch exceptions. For supporting information see [The Java Tutorial: Handling Errors Using Exceptions|http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html].
* ListOfNumbersWOHandler.java demonstrates how the compiler handles runtime and checked exceptions differently. A program must handle checked exceptions, but does not have to handle runtime exceptions. For supporting information see [The Java Tutorial: Handling Errors Using Exceptions|http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html].
----