Home Segments Top Top Previous Next

605: Mainline

If an error occurs, then Java is said to throw an exception. Whenever an expression has the potential to cause Java to throw an exception, you can embed that expression in a trycatch statement, in which you specify explicitly what Java is to do when an exception actually is thrown.