1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Exception handling statement.

Discussion in 'Programming' started by lewisb, Jun 19, 2005.

  1. #1
    The Java programming language provides a mechanism known as exceptions (in the glossary) to help programs report and handle errors. When an error occurs, the program throws an exception. What does this mean? It means that the normal flow of the program is interrupted and that the runtime environment attempts to find an exception handler—a block of code that can handle a particular type of error. The exception handler can attempt to recover from the error or, if it determines that the error is unrecoverable, provide a gentle exit from the program.

    Here's the general form of these statements:

    try {
    statement(s)
    } catch (exceptiontype name) {
    statement(s)
    } finally {
    statement(s)
    }
     
    lewisb, Jun 19, 2005 IP