rohan.chandane
03-05-2006, 02:24 PM
hi friendz :WAVE: ,
Can anybody tell me what are the advantages of exception in JAVA?
Regards,
Rohan Chandane
Can anybody tell me what are the advantages of exception in JAVA?
Regards,
Rohan Chandane
|
Click to See Complete Forum and Search --> : Advantages of Exceptions in JAVA rohan.chandane 03-05-2006, 02:24 PM hi friendz :WAVE: , Can anybody tell me what are the advantages of exception in JAVA? Regards, Rohan Chandane destin 03-05-2006, 03:18 PM Have you tried google? The Java(tm) Tutorial: Advantages of Exceptions (http://java.sun.com/docs/books/tutorial/essential/exceptions/advantages.html) nspils 03-05-2006, 11:40 PM Exceptions let you know when an exceptional event - something unexpected, something which is an error in execution - has occurred. It gives you the opportunity to rescue your program so it can continue to execute - if possible. It allows you to demonstrate your ability to think about the expectations of your user, and to live up to your responsibility to those users. Appropriate use of exceptions is a sign of your commitment to the art and the science of programming. arul 03-07-2006, 07:21 AM In addition to what nspils said: Due to heavy use of checked exceptions and minimal use of unchecked exceptions, there has been a hot debate in the Java community regarding true value of checked exceptions. Use checked exceptions when the client code can take some useful recovery action based on information in exception. Use unchecked exception when client code cannot do anything. For example, convert your SQLException into another checked exception if the client code can recover from it and convert your SQLException into an unchecked (i.e. RuntimeException) exception, if the client code cannot do anything about it. devx.com
Copyright Internet.com Inc. All Rights Reserved |