Can try statements be nested?
Answers were Sorted based on User's Feedback
Answer / manikandansit
yes we can.
class test
{
public static void main(String []adsfdasf)
{
try
{
try
{
}catch(Exception e)
{
}
}catch(Exception e)
{
}
}
}
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / devarathnam
Hi... yes ,"try" statements can be nested, but each try
must be having the one "catch" statement.Without "catch"
and "finally" statements ,"try" statement will be illegal
| Is This Answer Correct ? | 7 Yes | 0 No |
What are the difference between string, string builder, and string buffer in java?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
How do you add an element to an arraylist in java?
How do you do descending order in java?
What is the middleware?
What are the advantages of exception handling in java?
adapter class ?
What are the advantages of unicode?
What does string [] args mean?
What are different types of expressions?
What will happen if we declare don’t declare the main as static?
Can java run on google chrome?