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 about instanceof operator in java?
What is a function in java?
What does java stand for?
What do you mean by compiler?
Give the difference between the println method and sqrt method?
What is the use of java?
What is mean by collections in java?
What is a constructor overloading in java?
Is a char always 1 byte?
Why all programming languages have main as a execution starting point?
How many bits is a string?
Explain about fail fast iterators in java?