Is it compulsory for a try block to be followed by a catch block in java for exception handling?



Is it compulsory for a try block to be followed by a catch block in java for exception handling?..

Answer / Manveer

No, it is not mandatory. However, if an exception occurs within the 'try' block and there is no corresponding 'catch' block to handle it, the program will terminate with an error.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between yielding and sleeping in java programming?

1 Answers  


What is OOPs & Why?

3 Answers  


is it possible to instantiate the math class?

1 Answers  


What is supplier in java?

1 Answers  


what is auto boxing

3 Answers   UHG,


What is static import?

1 Answers  


What do you mean by of string::valueof expression in java 8?

1 Answers  


How do you input a string in java?

1 Answers  


What are advantages of using Java?s layout managers than windowing systems?

1 Answers  


In what types of operations an ArithmeticException will be thrown?

3 Answers  


What is flag in java?

1 Answers  


How do you square a number?

1 Answers  


Categories