O'Reilly logo

Effective Java, 3rd Edition by Joshua Bloch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix: Items Corresponding to Second Edition

Second Edition Item Number

Third Edition Item Number, Title

1

1, Consider static factory methods instead of constructors

2

2, Consider a builder when faced with many constructor parameters

3

3, Enforce the singleton property with a private constructor or an enum type

4

4, Enforce noninstantiability with a private constructor

5

6, Avoid creating unnecessary objects

6

7, Eliminate obsolete object references

7

8, Avoid finalizers and cleaners

8

10, Obey the general contract when overriding equals

9

11, Always override hashCode when you override equals

10

12, Always override toString

11

13, Override clone judiciously

12

14, Consider implementing Comparable

13

15, Minimize ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required