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
Write a program to print 15 random numbers using foreach of java 8?
Can a class be private or protected in java?
What is the maximum size of array in java?
Is space a character in java?
What is string value?
What is the locale class in java programming?
Can you change array size in java?
What is the use of beaninfo?
How many return statement are allowed in a function?
What is the final method?
What are the disadvantages of using inner classes?
How do you sort a set in java?
What was java originally called?
What is a function easy definition?
What is treeset in java?