• Monday, September 15, 2014

    Java Exception Handling

    Exceptions are special types of error which occurred at run time and leads to abnormal termination of the program.
    These exceptions are handled by the programmer.

    Some types of exception are:
    1. Math Error( such as division by zero)

    2. Memory Error(such as memory full, index out of bound)

    3. File system error(such as read/write error, file not found error)

    4. Network Error( such as host not found, port already in use)

    To handle this types of error java provides Exception class. These error handles as follow:

       //my code that may generate errors.
    catch(Exception e)
       // code to be executed if error occurs.

    Syed Masoom Rizvi

    Author & Editor

    Hi, This is Syed Masoom Rizvi, who is continue exploring the world of programming ,programming and programming... :)


    Post a Comment