Can multiple catch statements be used in exceptions ?
Answer Posted / sakthi k
Yes we can use multiple catch statement for the exception.
try
{
Sop("exception");
}
catch(NumberFormatException)
{
}
catch(Exception)
{
}
we have to include the child exception above the parent
exception otherwise it shows an error. .
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between static and dynamic binding in java?
What is method reference in java?
What is == mean?
Why is stringbuffer not immutable?
What is the significance of listiterator?
What is illegal identifier in java?
What is the exact difference in between Unicast and Multicast object?
What are the types of relation?
What are the differences between path and classpath variables?
Explain about OOPS concepts and fundamentals.
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
Difference between this() and super() ?
Why is multiple inheritance not supported in java?
What are multiple inheritances? Is it supported by java?
Explain the difference between arraylist and linkedlist in java?