Question: Can I use try/catch block to
control program flow? Will it affect program performance?
Answer: Try/catch block itself does not add
much overhead to your program. Handling of thrown exception can be expensive.
Use try/catch block only for error handling, not to control program flow.
Especially try to avoid placing within loops.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.