This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Here you are catching Exception first and then FrequencyException. That is why you are getting the compile time error. If you catch FrequencyException and then Exception, there won't be any compile error. This happens because FrequencyException extends Exception. So by catching Exception implicitly catches FrequencyException.
Am i right? [ July 17, 2005: Message edited by: Girish Bal ]
SCJA 1.0 (86%)
SCJP 1.4 (91%)
Rule to remember: All catch blocks must be ordered from most specific to most general. Simply we can say subclass exception first after that superclass exceptions we have to declare in catch block sequence...