A. Catalog of Traps and Pitfalls

Have you done the puzzles yet? If not, go to Chapter 1! Go directly to Chapter 1. Do not pass GO. Do not collect $200. If you read this chapter before doing the puzzles, it will take all the fun out of the book. Don’t say we didn’t warn you.

This chapter contains a concise taxonomy of traps and pitfalls in the Java platform. Each entry in the catalog is divided into three parts:

A short description of the trap or pitfall

Prescription: How to avoid the trap or reduce the risk of falling victim.

References: Pointers to additional information concerning the trap. This typically includes a reference to the puzzle that is based on the trap. Many entries also have Java Language Specification and Effective Java references ...

Get Java™ Puzzlers: Traps, Pitfalls, and Corner Cases now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.