Advantages of exception handling PDF

Title Advantages of exception handling
Course Java Programming
Institution Kannur University
Pages 2
File Size 55.4 KB
File Type PDF
Total Downloads 34
Total Views 186

Summary

It’s a lecture note...


Description

Advantages of exception handling 1. Provision to complete program execution: One of the important purpose of exception handling in Java is to continue program execution after an exception is caught and handled .Execution does not terminate when an exception occurs.Once the exception is resolved program execution continuous till compilation. 2.Easy identification program code and error handling code: The use of try catch block segregates error handling code and program code making it easier to identify the logical flow of a program.The logic in the program code does not include details of the action to be performed when a exception occurs.Such details are present in the catch block.

3.Meaning full error reporting: Exception thrown in a Java program are objects of clans.You can obtain a description of an exception in the form of a string and display the description using a println statement. eg:catch(ArithmeticException e) System.out.println(“Exception occur”); 4.Grouping and differentiating Error types...


Similar Free PDFs