samar
error handling mechanism
1 Answer(s)      4 years and 10 months ago
Posted in : Java Interview Questions
What is Java error handling mechanism?
Advertisement
View Answers

October 29, 2010 at 1:10 PM


Hi,

The exception handling mechanisms in Java provide a clean way to check for errors without cluttering code. Exceptions also provide a means to signal errors directly rather than use flags or side effects such as fields that must be checked. Exceptions make the error conditions that a method can signal an explicit part of the methods contract. The list of exceptions can be seen by the programmer, checked by the compiler and preserved by extended classes that override the method.

Traditional error handling methods include Boolean functions (which return TRUE/FALSE), integer functions (returns ??1 on error) and other return arguments and special values. Some of the drawbacks associated with these methods are that the programmer must remember to check for the return codes, it can lead to diminished readability of the source code, and one cannot rely on the functions being consistent.

For more detailed study go to the link-

http://www.roseindia.net/java/exceptions/exception.shtml

Thanks.










Related Tutorials/Questions & Answers:
error handling mechanism
error handling mechanism  What is Java error handling mechanism
exception handling mechanism
exception handling mechanism  Explain Java's exception handling mechanism in detail.   Please visit the following links: http.../exceptions/catching-and-handling-exceptions.shtml
Advertisements
Understanding the jQuery event handling mechanism
Understanding the jQuery event handling mechanism... handling mechanism First of all , you need to know -What is an event... for handling events , it provides many efficient method to handle
Exception handling mechanism
Exception handling mechanism In this tutorial you will learn about exception handling mechanism in java. Exception means error in your program. Exception handling mechanism is a way to handle the exception in your program. Using three
php error handling function
php error handling function  Is there any library or function that can be used to handle errors in PHP
PHP Error handling
PHP Error handling: PHP provides so many techniques to handle error, if error occurs an error message is send to the browser. Error handling should... application. In this tutorial you will come to know about different handling methods
Error handling - Java Beginners
Error handling  Hello, Help me write code as instructed bellow for a Java program. 1. Create a new Movie class which has two properties, title and rating. 2. Create a new Cinema class, add method addMovieGoers which takes
PHP Error Handling Functions
Though every programming language offers default error handling methods. You can also write your own error handling functions in PHP. There is a bit difference between user defined error handling method and a default error handling
PHP Error handling
PHP Error handling Your application must have an error handling codes. Without it, it looks very unprofessional. PHP have following error handling methods... handling using set_error_handler() function as follows : <?php //error handler
Exception Handling-Error Messages in Program
Exception Handling-Error Messages in Program  Sorry about the first code block: import java.util.*; class GradeException extends Exception{ public GradeException(String s){ System.out.println(s); } } ----jGRASP exec: javac -g C
exception handling code for file not found error..
exception handling code for file not found error..  How to do exception handling for file not found error
Exception Handling-Error Messages in Program
Exception Handling-Error Messages in Program  Hi Friend, I am having trouble running this code as per my prior question on Exception handling... with this. Here is the code with the error messages as Follows: import
PDO Error Handling
PDO Error Handling: In this current tutorial we will study about the error handling methodology in PDO extension. In general we use try and catch block to handle the errors in the database connection but to handle other kind
Error handling - Java Server Faces Questions
Error handling  How to handle error handling in JavaScript? Say we have this index.jsp file and we like to add some JavaScript into it based... otherwise give an error
Error handling - Java Server Faces Questions
Error handling  How to handle error handling in JavaScript? Say we have this index.jsp file and we like to add some JavaScript into it based... otherwise give an error. *The score here must be between 0 - 100
exception handling
of exception handling mechanism.   Java Exception Exception... that the calling method takes care of that error. 3)With the help of this mechanism the working code and the error-handling code can be disintegrated. It also gives us
Error Handling in Java Script
Error Handling in Java Script  ... will Learn how to handle error in java script. JavaScript is scripting language used for client side scripting. and error are handling in two ways.   *try
back ground mechanism of jsf framework
back ground mechanism of jsf framework  what is back ground mechanism of jsf framework?   Hi Friend, Please visit the following link: JSF Tutorials Thanks   Thanks
Specifying an Authentication Mechanism in the Deployment Descriptor
In this section, you will learn how to specify an authentication mechanism in the deployment descriptor
exception handling
exception handling  explain about exception handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
exception handling
exception handling  what is the information of exception handling?   Have a look at the following link: Java Exception Handling
event handling
event handling  diff btwn event handling in ASP.net and in HTML