What will happen if we write code like:
try{}catch(exception e)catch(IOException i)
Answers were Sorted based on User's Feedback
Answer / maurice johnson
Ignoring the incorrect syntax of the Try\Catch Block, it
will never reach the IOException portion of the
Catch......the first catch will always be triggered due to
it only Catching type Exception.
| Is This Answer Correct ? | 12 Yes | 3 No |
Answer / jahri
yes it should be child exception to base exception
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / mathi
Ignoring the incorrect syntax of the Try\Catch Block, it
will never reach the IOException portion of the
Catch......the first catch will always be triggered due to
it only Catching type Exception.
| Is This Answer Correct ? | 1 Yes | 1 No |
Why is stringbuffer not immutable?
What is the difference between declaration and definition in java?
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
what is the use of abstract class?
3 Answers Amdocs, Atos Origin, Invictus,
how to handle exceptions in ejb?
What is covariant return type?
What is bufferedreader in java?
What is the use of static import ?
Is char a method in java?
How multi processing is achieved in JAVA?
What does mean in regex?
How to validate the request (Eg:user name and password) in session(http session)? not in LDAP server ?