Which of the following methods can throw an Exception ?(a) methods with throws clause (b) methods with a catch block(c) methods with a try block (d) methods with finally block
Answers
Answered by
0
Option (c) because try block try block thows an exception.
Answered by
1
"Option: (a), Methods with throw clause
Among the given methods, the methods throws away an exception are the methods with a throws clause. So, the correct choice of answer for the given question from the list of answers is (a) methods with throws clause.
The reason why option b and c are not correct is because only try block or only catch block can’t handle an exception itself. The try and catch blocks are supposed to be used in combination as a try-catch block.
"
Similar questions