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 the files generated after using IDL to java compiler?
What is string syntax?
What are the advantages of arraylist over arrays?
What are methods of a class?
State differences between C and Java?
Is string serializable in java?
What is a qualifier in a sentence?
Can Exception handling we can handle multiple catch blocks?
Why are lists ordered in java?
What is independent and dependent variables in research?
Can we sort set in java?
What are different type of exceptions in java?
Why string is called as immutable?
What is token in java?
Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example