Exceptions - Study Mode

[#56] Which of these exceptions handles the divide by zero error?
Correct Answer

(A) ArithmeticException

[#57] What is an exception in Java?
Correct Answer

(A) An error that occurs during runtime

[#58] Which keyword is used to handle exceptions in Java?
Correct Answer

(D) catch

[#59] What is the purpose of the "try" block in exception handling?
Correct Answer

(C) It contains the code that might throw an exception

[#60] In Java, can a method declare multiple exceptions using the "throws" keyword?
Correct Answer

(B) Yes, a method can declare multiple exceptions separated by commas