I have been reading the same page for a little more than an hour.
In KB book, page 254, it stated something like "All other catch clauses associated with the same try are ignored and the exception is thrown back to the calling method (the next method down the call stack) If you throw a checked exception from the catch clause, you must also declare that exception. I have 2 questions. First how should I fix the following code so that it considered as re-declare again ? I am thinking declaring in LINE # 1 but then what is the point of this sub-chapter? Isn't it trying to show me what is rethrowing the same exception ???
Second, I am not able to follow the author in describing the different between the following codes and the above one. I think the codes presented in the book got to have a reason.
I am hoping someone can give me a more realistic small portion of the codes demonstration.
Thanks, [ November 06, 2004: Message edited by: Kay Liew ]
Unity can only be manifested by the Binary. Unity itself and the idea of Unity are already two.
Joined: Feb 22, 2004
You have written the code example wrong. They would never compile.
The snippet in the book that just lists the catch clause does the same thing as the catch clause above. It's in the book to highlight that you can re-throw a caught exception.
Mark Patrick<br />SCJP 1.4
Joined: Dec 26, 2003
Thank you for the hint. I think you have confirmed with what I read. It made more sense now.