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 methods used to implement for the key object in the hash map?
Hi can u pls tell me what is the use of marker interface. Iknow what is marker interface but what ability will the object get by implementing this.
What is the difference between ArrayList and Vector? which one is better in Java
0 Answers SkillGun Technologies,
How many bytes is a url?
What is double word?
ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }
What is the purpose of the main method?
What is arraylist e?
Can we able to pass objects as an arguments in java?
What is dot operator?
When should you use arraylist and when should you use linkedlist?
What are the advantages and disadvantages of reference counting in garbage collection?