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 |
In Java, what are public static void main string args?
What is a dot notation?
Can we declare a class as abstract without having any abstract method?
What is the difference between numeric and integer?
Can you explain the Java thread lifecycle?
In the HashMap, we know the values but we dont know the key, then how can we get the key from HashMap ?????
1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?
If your team member writes code with lots of static variables and static methods, will it cause any side effects?
What is qms certification?
How to make a class or a bean serializable?
What do you understand by java?
Why charat is used in java?