1 Introduction
2 Creating and Destroying Objects:
Item 1: Consider static factory methods instead of constructors
Item2: Consider a builder when faced with many constructor parameters
Item3: Enforce the singleton property with a private constructor or an enum type
Item4: Enforce noninstantiability with a private constructor
Item5: Avoid creating unnecessary objects
Item6: Eliminate obsolete object references
Item7: Avoid finalizers
3 Methods Common to All Objects
Item8: Obey the general contract when overriding equals
Item9: Always override hashCode when you override equals
Item10: Always override toString
Item11: Override clone judiciously
Item12: Consider implementing Comparable
4 Classes and Interfaces
Item13: Minimize the accessibility of classes and members
Item14: In public classes, use accessor methods, not public fields
Item15: Minimize mutability
Item16: Favor composition over inherience
Item17: Design and document for inherirance or else prohibit it
Item18: Prefer interfaces to abstract classes
Item19: Use interfaces only to define types
Item20: Prefer class hierarchies to represent strategies
Item21: Use function objects to represent strategies
Item22: Favor static member classes over nonstatic
5 Generics
Item23: Don't use raw types in new code
Item24: Eliminate unchecked warnings
Item25: Prefer lists to arrays
Item26: Favor generic types
Item27: Favor generic methods
Item28: Use bounded wildcards to increase API flexibility
Item29: Consider typesafe heterogeneous containers
6 Enums and Annotations
Item30: Use enums instead of int constants
Item31: Use instance fields instead of ordinals
Item32: Use EnumSet instead of bit fields
Item33: Use EnumMap instead of ordinal indexing
Item34: Emulate extensible enums with interfaces
Item35: Prefer annotations to naming patterns
Item36: Consistently use the Override annotation
Item37: Use marker interfaces to define types
7 Methods
Item38: Check parameters for validity
Item39: Make defensive copies when needed
Item40: Design method signatures carefully
Item41: Use overloading judiciously
Item42: Use varargs judiciously
Item43: Return empty arrays or collections, not nulls
Item44: Write doc comments for all exported API elements
8 General Programming
Item45: Minimize the scope of local variables
Item46: Prefer for-each loops to traditional for loops
Item47: Know and use the libraries
Item48: Avoid float and double if exact answers are required
Item49: Prefer primitive types to boxed primitives
Item50: Avoid strings where other types are more appropriate
Item51: Beware the performance of string concatenation
Item52: Refer to objects by their interfaces
Item53: Prefer interfaces to reflection
Item54: Use native methods judiciously
Item55: Optimize judiciously
Item56: Adhere to generally accepted naming conventions
9 Exceptions
Item57: Use exceptions only for exceptional conditions
Item58: Use checked exceptions for recoverable conditions and runtime exceptions for programming errors
Item59: Avoid unnecessary use of checked exceptions
Item60: Favor the use of standard exceptions
Item61: Throw exceptions appropriate to the abstraction
Item62: Document all exceptions thrown by each method
Item63: Include failure-capture information in detail messages
Item64: Strive for failure atomicity
Item65: Don't ignore exceptions
10 Concurrency
Item66: Synchronize access to shared mutable data
Item67: Avoid excessive synchronization
Item68: Prefer executors and tasks to threads
Item69: Prefer concurrency utilities to wait and notify
Item70: Document thread safety
Item71: Use lazy initialization judiciously
Item72: Don't depend on the thread scheduler
Item73: Avoid thread groups
11 Serialization
Item74: Implement Serializable judiciously
Item75: Consider using a custom serialized form
Item76: Write readObject methods defensively
Item77: For instance control, prefer enum types to readResolve
Item78: Consider serialization proxies instead of serialized instances