|What is the purpose of try?
We should maintain all risky code inside the try
What is the purpose of catch block?
We have to maintain all Exception Handling code
inside the catch block.
Is try with multiple catch block is possible?
The way of handling an exception is varied from exception to exception compulsory we have to write a separate catch block for every exception.
Hence try will multiple catch block is possible and it is recommended to use.
If try with multiple catch block present is order of catch blocks important in which order we have to take?
If try with multiple catch block present then the order of catch block is very important it should be from child to parent but not from parent to child.
Do you have a Java Problem?
Return to : Java Programming Hints and Tips
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.