Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5DfjBGLBr7F5km2AN
22 lines
728 B
Plaintext
22 lines
728 B
Plaintext
=== Q39 Checked vs unchecked exceptions ===
|
|
checked: NoSuchFileException (is an IOException: true)
|
|
unchecked: ArithmeticException: / by zero
|
|
NoSuchFileException is checked: true
|
|
=== Q40 try, catch, finally and return ===
|
|
finally runs before the method actually returns
|
|
returned 1
|
|
primitiveSnapshot = 10
|
|
finallyOverrides = 7
|
|
=== Q41 throw vs throws, and custom exceptions ===
|
|
withdrawal refused <- cause: balance 100 < 500
|
|
=== Q42 try-with-resources and suppressed exceptions ===
|
|
open first
|
|
open second
|
|
close second
|
|
close first
|
|
caught: body failed
|
|
suppressed: close failed: second
|
|
=== Q43 Error vs Exception, and multi-catch ===
|
|
Error, not Exception: Requested array size exceeds VM limit
|
|
multi-catch caught ClassCastException
|