Java MCQ: Which of these keywords is used for the block to be examined for exceptions?
a) try
b) catch
c) throw
d) throws
Answer:
a) try
Explanation:
The try
block is used in Java to specify a block of code that will be examined for exceptions. If an exception is thrown within this block, it will be caught by a corresponding catch
block.
Reference links:
https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html