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 lambda in java?
Is 9 a prime number?
what is thread in Java ?
What is public static void main?
Which package is used for pattern matching with regular expressions?
What are the two ways to create a thread?
Can an interface have a constructor?
Write a program in java to find the maximum and minimum value node from a circular linked list.
What is a data structure java?
What is the main purpose of serialization in java?
How do you check if an arraylist is not empty?
What is the protected method modifier?
What are kinds of processors?
What is object class in java?
Can static methods be inherited?