December 2015
Beginner to intermediate
832 pages
26h 13m
English
Exceptions are not an object-oriented feature themselves. We discuss them briefly nevertheless, because they heavily influence the style of collaboration between objects. Independently of whether we choose to
1.5.7declare them explicitly in methods’ interfaces or use unchecked exceptions throughout, callers must be aware of possible exceptions and must be prepared to react correspondingly. At the same time, robustness and proper error handling are major requirements for professional code.
Java’s exception mechanism is really straightforward: throw stops normal execution; code in the block is skipped, methods ...