Exceptions II
We will extend our discussion about ‘Exceptions’ which we had started in an earlier post. These were the key takeaways from our earlier post: Differences between checked and unchecked exceptions Important points regarding ‘finally’ clause Specific exceptions must be declared before the general exceptions In this post, we will discuss the legal and illegal forms of ‘try-catch’ constructs and more ways to declare exceptions. A. Legal and Illegal forms of ‘try-catch’ constructs : It is illegal to use ‘try-catch-finally’ clause without the ‘catch’ clause or the ‘finally’ clause. In other words, it is illegal to use the ‘try’ clause alone. […]