InterviewSolution
Saved Bookmarks
| 1. |
Which of the following keyword is used by calling function to handle exception thrown by called function?(a) throws(b) throw(c) try(d) catchThis question was posed to me during an interview for a job.Question is from Exception Handling in section Exception Handling of Java |
|
Answer» CORRECT answer is (a) throws To explain I would say: A method specifies behaviour of being capable of causing exception. Throws clause in the method DECLARATION GUARDS caller of the method from exception. |
|