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

Answer Posted / sitaram

it is not complied. because first catch having child
exception and last exception having parent exception is must.
correct answer is :
try{
}
catch(IOException i){
}
catch(Exception e){
}

Is This Answer Correct ?    19 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by the term string pool?

760


What is Enum in Java?

894


What is boolean logic?

760


What are synchronized methods and synchronized statements in java programming?

792


Can a method be static?

728


How is tree Mirroring implemented?

813


What are the main features of java?

735


Why is the singleton pattern considered to be an anti pattern?

668


How is it possible for two string objects with identical values not to be equal under the == operator?

736


What is the purpose of final keyword and when to use it?

761


Why string is not thread safe?

764


What are computer functions?

699


What is return code?

760


What are different types of expressions?

749


What is the relationship between class and object?

759