Answers to Chapter 19 Review Questions
||List three examples of typical exceptions.|
||Dividing by zero, running out of memory, accessing a non-existent file.|
||What are the advantages of handling exceptions with try-catch-finally?|
||The normal case code and exception handling code can be kept separate. Exceptions can be handled gracefully without exposing the end user to cryptic looking code.|
||Which class is at the top of the exceptions class hierarchy?|
||How many catch and finally blocks can be attached to a try block?|
||Zero, one or many catch blocks, and zero or one finally block. However, at least one block (it can either be a catch or a finally block) must be attached to a try block.|
||What happens to ...|
Get C# Primer Plus now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.