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 |
What is a class object?
why java does not support unsigned keyword?
What is difference between final and immutable?
Is java a digit method?
how to deploy tomcatserver to weblogic server? write d following steps?
Why does java not support pointers?
Explain when classnotfoundexception will be raised ?
What do you mean by an object in java?
What is intern method in java?
why abstract class does not have object creation
What is java instanceof operator?
What are the advantages of java over C++?