Java exception handling: When to use exception mechanism? nWhen the method cannot complete its task due to reasons beyond its control nThe file does not exist, the network connection cannot be established... nHandle exceptions thrown in methods, class libraries, and classes nFor example, FileInputStream.read generates IOException nWhen a unified approach is used to handle exceptions in large projects nFor example, writing a word processor nExceptions should be failures that do not occur frequently but may occur nEvents that are bound to occur should not be handled with exception mechanism nException handling is used to recover the system from failures nPrompt information/do not produce invalid results/release resources
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore