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
Is it possible to compare various strings with the help of == operator?
What an i/o filter?
Do I need java for windows 10?
What is anagram number?
Explain with example the concept of constant variable in java.
What are voids?
What is the difference between compile-time polymorphism and runtime polymorphism?
What is the difference between integer parseint and integer valueof?
What are the ways to instantiate the class class?
What do you mean by aggregation?
What is floor in java?
What is a java string?
What is strings in java?
Why are getters and setters used?
Enlist few advantages of inheritance?