What will happen if we write code like:
try{}catch(exception e)catch(IOException i)

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the += operator called?

577


'A class is a template for an object' explain this statement.

544


Can a static block throw exception?

651


Differentiate jar and war files?

588


What is the impact of declaring a method as final?

556






Can we override static methods in java?

581


What is the difference between variable declaration and variable initialization?

502


When should the method invokelater() be used?

582


What are the differences between heap and stack memory?

543


Can you instantiate the math class in Java?

605


Can we able to pass objects as an arguments in java?

530


What are scriptlets?

595


What is mysql driver class name?

550


Can we create an object of static class in java?

591


Can we overload destructor in java?

538