Hi Rohit! I wouldn't speak on superclass or subclass functions, at least for catching purposes. I´d focus on the information about the exception that they give to the user.
If we use Exception class, the user will know that an exception occurred, but it will have no more information. If we believe that an IOException might occur, we can use an IOException class object instance to give more information to the user. As well as in the example of by zero division: we can inform that an Exception occurred, or that an Arithmetic Exception occurred or, more specifically, that a By Zero Division Exception occurred. It is only up to us what level of information we want to give. In principle, we´ll give the most accurate information, but I guess that it depends. I hope it helps. Martintxo. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this group, send email to javaprogrammingwithpassion-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---