I try to catch what you mean, ok i try to use inheritance to explain to you why when we use Exception it still work. for example:
public class _superclass { } public class _sub extends _superclass{ } public class test { public static void main(String [] args){ _sub objectsub = new _sub(); testing( objectsub); // pls look at the parameter of the testing method, even though the method require superclass but you can pass_sub as the arguement as well } public static void testing (superclass x){ } } ______________________________________________________________________________________________________________ In exception handling when the time u call getmessage(), if let assume that the IO exception occur, if you use exception, it will tell you that you get a exception problem, but if you use IOexception, it will tell you that you have an IO exception problem instead of an exception problem. If you use exception it will not help much, you know you have an exception but you don't know what kind of exception you will get. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---