This section describes common traps which have clear rules for avoidance. All are from real world situations.
In this chapter:
[trap.static] Be wary of static initialization
[trap.clever] Clever code is not always easy to debug
[trap.this] Don’t call methods on ‘this’ in constructors
[trap.serializable] Serializable on inner classes
[trap.byte] Limit size of byte arrays
[trap.gc] Garbage Collection is dead to you
[trap.static] Be wary of static initialization
[trap.clever] Clever code is not always easy to debug
[trap.this] Don’t call methods on ‘this’ in constructors
[trap.serializable] Serializable on inner classes
[trap.byte] Limit size of byte arrays
[trap.gc] Garbage Collection is dead to you