Can try statements be nested?

Answers were Sorted based on User's Feedback



Can try statements be nested?..

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

Can try statements be nested?..

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

Can try statements be nested?..

Answer / ashokmail.java@gmail.com

Yes

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the types of inner classes (non-static nested class) used in java?

0 Answers  


Can we override private method in java?

0 Answers  


What are the object and class classes used for?

0 Answers  


Can we call the Thread.sleep in Synchyronozed block?

5 Answers   Logica CMG,


what is aggregation in java?

0 Answers   IBS,






How do you remove all elements from an arraylist in java?

0 Answers  


Where are global variables stored?

0 Answers  


What is a method type?

0 Answers  


Explain the importance of thread scheduler in java?

0 Answers  


Explain the difference between comparator and comparable in java?

0 Answers  


What is thread?

7 Answers   BMC, Virtusa,


what is wrapper class and its uses?

2 Answers  


Categories