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 types of inner classes (non-static nested class) used in java?
Can we override private method in java?
What are the object and class classes used for?
Can we call the Thread.sleep in Synchyronozed block?
what is aggregation in java?
How do you remove all elements from an arraylist in java?
Where are global variables stored?
What is a method type?
Explain the importance of thread scheduler in java?
Explain the difference between comparator and comparable in java?
What is thread?
what is wrapper class and its uses?