Important points in Exception Handling?
>> Monday, May 23, 2011
1.If we have try with multiple catch blocks ,the order of catch blocks must be from child to parent .
2.We can handle the Exceptions by using try and catch blocks.
3. Throws keyword can be used ,when the programmer doesn't want to handle the Exception and throws it out the method.
4.Throw keyword can be used , if the programmer want to handle an Exception Explicitly and throw in catch block.
5.try----> to maintain risky code.
6.catch---> to maintain Exception handling code.
7.finally------>to maintain clean code.
8.Throwable is the super class of all exceptions and errors.
2.We can handle the Exceptions by using try and catch blocks.
3. Throws keyword can be used ,when the programmer doesn't want to handle the Exception and throws it out the method.
4.Throw keyword can be used , if the programmer want to handle an Exception Explicitly and throw in catch block.
5.try----> to maintain risky code.
6.catch---> to maintain Exception handling code.
7.finally------>to maintain clean code.
8.Throwable is the super class of all exceptions and errors.
0 comments:
Post a Comment