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 java dot?

696


Which variables are stored in heap?

756


What is hashtable and explain features of hashtable?

756


What are the object and class classes used for?

773


How do you convert int to char in java?

811


What is a java list?

820


Can we declare register variable as global?

724


Is string an object?

863


In a container there are 5 components. I want to display all the component names, how will you do that?

1834


Explain the differences between abstraction and encapsulation?

769


What is oop in java?

714


What are the methods to rectify ambiguities in the interfaces in JAVA?

818


How do you add spaces in java?

728


What is parsing a sentence?

751


What is a condition in java?

702