Try to guess instead of running the code. Think what the java compiler
guy was thinking when they wrote java specs.
Pratham
unread,
Feb 1, 2008, 6:13:51 AM2/1/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pune Java Puzzles
If at all in this code an exception is thrown is going to get caught
in the first catch block and it will skip all other catches.
The idea is to catch the more specific exception rather than then
catching the more generic one. and if at all we do not have the catch
block for the specific exception then only it should throw the generic
exception
Yogesh Patel
unread,
Feb 4, 2008, 5:32:03 AM2/4/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pune-jav...@googlegroups.com
So , java compiler report error for that, its unreachable code.