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 are recursive functions? Give some examples?
Why do we need singleton class?
Is it possible for a yielded thread to get chance for its execution again?
What is the difference between the font and fontmetrics classes in java programming?
Where is stringbuffer stored?
Which one will take more memory: an int or integer?
How does hashset work in java?
What is thread pool in java with example?
Explain the polymorphism principle?
What is the technique adopted to create an immutable class?
Which is bigger float or double java?
How to make object serializable in java?
Can we use switch statement with strings?
What is java in layman terms?
How many types of the indexof method are there for strings?