Search Interview Questions
| 3335 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Core java - Interview Questions and Answers for 'Headstrong' - 1 question(s) found - Order By Newest|
|Ans. 1. Wrap the desired code in try block followed by a catch / finally to catch the exception|
2. Declare the throws clause with exceptions that the code is expected to throw as an indication to the calling method to take care of it.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  exception handling Asked in 4 Companies|
Try 1 Question(s) Test
|What things should be kept in mind while creating your own exceptions in Java?|
|Explain java.lang.OutOfMemoryError ?|
|How compiler handles the exceptions in overriding ?|
|What will happen if we don't have termination statement in recursion ?|
|Name few Java Exceptions ?|
|How can we make sure that a code segment gets executed even in case of uncatched exceptions ?|
|Is it necessary that each try block to be followed by catch block ?|
|What is exception propogation ?|
|Can we have try and catch blocks within finally ?|
|Which of the following exception is thrown when we try to access element which is beyond the size ?|