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
Name few "optional" classes introduced with java 8 ?
Why to use nested classes in java?
What is primitive array?
What state does a thread enter when it terminates its processing in java programming?
Can a class be private or protected in java?
Why java is used everywhere?
What is the purpose of the runtime class in java programming?
Define how objects are stored in java?
How does a cookie work in Servlets?
What isan abstract class and when do you use it?
What class allows you to read objects directly from a stream?
Can a class extend more than one class?
Can an object subclass another object?
Is arraylist an object in java?
What is nested interface?