Exceptions - Study Mode

[#1] In Java, which type of exceptions are checked at compile-time?
Correct Answer

(C) Checked exceptions

[#2] In Java, which type of exceptions are unchecked at compile-time?
Correct Answer

(A) Unchecked exceptions

[#3] In Java, can a "finally" block be used without a "try-catch" block?
Correct Answer

(C) No, a "finally" block must be associated with a "try-catch" block

[#4] What is the purpose of the "finally" block in Java exception handling?
Correct Answer

(B) To specify code that must be executed regardless of whether an exception is thrown or caught

[#5] In Java, can a "finally" block be used without a "catch" block?
Correct Answer

(C) Yes, a "finally" block can be used independently