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 is predefined function in java?
How is rounding performed under integer division?
What is class and its types?
whether java is fully object oriented language or partially object oriented language
What is the return type of read()?
What is the main purpose of serialization in java?
Is java 1.7 the same as java 7?
Is void a data type in java?
What is a condition in java?
What is int lol?
What types of inheritance does Java support?
Is java util list serializable?