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
What is the functionability stubs and skeletons?
Name few java util classes introduced with java 8 ?
Explain about the main() method in java?
Name few java.lang classes introduced with java 8 ?
Is there a sort function in java?
Write java program to reverse string without using api?
Does java allow overriding static methods ?
Is call by reference possible in java?
What is the use of put method?
What is an interface in java? Explain
Can we overload final method in java?
Why vector class is used?
What is the difference between conversation & casting?
What are the advantages of inner classes?
What is the basic of java?