1 [Theory – 1h: Practice – 2h] Creating and Destroying Objects
Item 1: Consider static factory methods instead of constructors
Item 2: Consider a builder when faced with many constructor parameters
Item 3: Enforce the singleton property with a private constructor or an enum type
Item 4: Enforce non-instantiability with a private constructor
Item 5: Avoid creating unnecessary objects
Item 6: Eliminate obsolete object references
Item 7: Prefer dependency injection to hardwiring
2 [Theory – 1h: Practice – 1.5h] Methods Common to All Objects
Item 8: Obey the general contract when overriding equals
Item 9: Always override hashCode when you override equals
Item 10: Always override toString
Item 11: Override a clone judiciously
Item 12: Consider implementing Comparable
3 [Theory – 1.5h: Practice – 2.5h] Classes and Interfaces
Item 13: Minimize the accessibility of classes and members
Item 14: In public classes, use accessor methods, not public fields
Item 15: Minimize mutability
Item 16: Favor composition over inheritance
Item 17: Design and document for inheritance or else prohibit it
Item 18: Prefer interfaces to abstract classes
Item 19: Use interfaces only to define types
Item 20: Prefer class hierarchies to tagged classes
Item 21: Use function objects to represent strategies
Item 22: Replace Anonymous Classes with Lambda Expressions
Item 23: Consider using method references
Item 24: Favor static member classes over nonstatic
4 [Theory – 1h: Practice – 2h] Generics
Item 25: Don’t use raw types in new code
Item 26: Eliminate unchecked warnings
Item 27: Prefer lists to arrays
Item 28: Favor generic types
Item 29: Favor generic methods
Item 30: Use bounded wildcards to increase API flexibility
Item 31: Consider typesafe heterogeneous containers
Item 32: Use the diamond operator for type inference
5 [Theory – 1h: Practice – 1.5h] Enums and Annotations
Item 33: Use enums instead of int constants
Item 34: Use instance fields instead of ordinals
Item 35: Use EnumSet instead of bit fields
Item 36: Use EnumMap instead of ordinal indexing
Item 37: Emulate extensible enums with interfaces
Item 38: Prefer annotations to naming patterns
Item 39: Consistently use the Override annotation
Item 40: Use marker interfaces to define types
6 [Theory – 1h: Practice – 0.5h] Methods
Item 41: Check parameters for validity
Item 42: Make defensive copies when needed
Item 43: Design method signatures carefully
Item 44: Use overloading judiciously
Item 45: Use varargs judiciously
Item 46: Return empty arrays or collections, not nulls
7 [Theory – 2h: Practice – 1.5h] General Programming
Item 47: Minimize the scope of local variables
Item 48: Prefer for-each loops to traditional for loops
Item 49: Know and use the libraries
Item 50: Avoid float and double if exact answers are required
Item 51: Prefer primitive types to boxed primitives
Item 52: Avoid strings where other types are more appropriate
Item 53: Beware the performance of string concatenation
Item 54: Refer to objects by their interfaces
Item 55: Prefer interfaces to reflection
Item 56: Adhere to generally accepted naming conventions
Item 57: Use underscores in Numeric Literals
Item 58: Use switch on Strings
Item 59: Use streams for map/filter/reduce operations
8 [Theory – 1.5h: Practice – 1.5h] Exceptions
Item 60: Use exceptions only for exceptional conditions
Item 61: Use checked exceptions for recoverable conditions and runtime exceptions for programming errors
Item 62: Decide about try-catch/throws use for checked exceptions
Item 63: Favor the use of standard exceptions
Item 64: Throw exceptions appropriate to the abstraction
Item 65: Include failure-capture information in detail messages
Item 66: Strive for failure atomicity
Item 67: Don’t ignore exceptions
Item 68: Use multiple exception types catching
Item 69: Use try with resources
9 [Theory – 1h: Practice – 1h] Concurrency
Item 70: Synchronize access to shared mutable data
Item 71: Avoid excessive synchronization
Item 72: Prefer executors and tasks to threads
Item 73: Prefer concurrency utilities to wait and notify
Item 74: Document thread safety
10 [Theory – 1h: Practice – 0.5h]Serialization
Item 75: Write readObject methods defensively
Item 76: Implement Serializable judiciously
11 [Theory – 1h: Practice – 1h] Lambdas and Streams
Item 77: Prefer lambdas to anonymous classes
Item 78: Prefer method references to lambdas
Item 79: Favor the use of standard functional interfaces
Item 80: Use streams judiciously
Item 81: Prefer side-effect-free functions in streams
Item 82: Prefer Collection to Stream as return type
Item 83: Use caution when making streams parallel
12 [Theory – 0.5h: Practice – 1h] From Java 9 and beyond
Item 84: Consider using the var keyword
Item 85: Use records to create immutable classes
Item 86: Use switch expressions
Item 87: Use text blocks
Item 88: Use pattern matching for instanceof
Item 89: Consider sealed classes
Item 90: Use Stream.toList()