Skip to Main Content
How to Use Objects: Code and Concepts
book

How to Use Objects: Code and Concepts

by Holger Gast
December 2015
Beginner to intermediate content levelBeginner to intermediate
832 pages
26h 13m
English
Addison-Wesley Professional
Content preview from How to Use Objects: Code and Concepts

1.5 Exceptions

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 Image 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.

1.5.1 Basic Usage

Java’s exception mechanism is really straightforward: throw stops normal execution; code in the block is skipped, methods ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Strange Code

Strange Code

Ronald T. Kneusel
Five Lines of Code

Five Lines of Code

Christian Clausen

Publisher Resources

ISBN: 9780133840100Purchase book