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 the size of integer?
What are abstract methods in java?
How multipleInheritance is possible in java?
Will minecraft java be discontinued?
How can you handle java exceptions?
What is dot operator?
What is default locale java?
Who is founder of java?
Why arraylist is used in java?
Is assembly language a low level language?
Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
What are parent methods and how can you call them?