DEV Community 👩‍💻👨‍💻

Effective Java Review Series' Articles

Back to Kyle Carter's Series
Effective Java Tuesday! Let's Consider Static Factory Methods

Effective Java Tuesday! Let's Consider Static Factory Methods

Reactions 110 Comments 5
4 min read
Effective Java Tuesday! The Builder Pattern!

Effective Java Tuesday! The Builder Pattern!

Reactions 24 Comments 1
4 min read
Effective Java Tuesday! Singletons!

Effective Java Tuesday! Singletons!

Reactions 17 Comments 15
3 min read
Effective Java Tuesday! Utility Classes!

Effective Java Tuesday! Utility Classes!

Reactions 12 Comments
2 min read
Effective Java Tuesday! Prefer Dependency Injection!

Effective Java Tuesday! Prefer Dependency Injection!

Reactions 16 Comments 2
3 min read
Effective Java Tuesday! Avoid Creating Unnecessary Objects!

Effective Java Tuesday! Avoid Creating Unnecessary Objects!

Reactions 15 Comments 3
3 min read
Effective Java Tuesday! Don't Leak Object References!

Effective Java Tuesday! Don't Leak Object References!

Reactions 7 Comments
3 min read
Effective Java Tuesday! Avoid Finalizers and Cleaners!

Effective Java Tuesday! Avoid Finalizers and Cleaners!

Reactions 9 Comments
3 min read
Effective Java Tuesday! Prefer try-with-resources

Effective Java Tuesday! Prefer try-with-resources

Reactions 11 Comments 2
3 min read
Effective Java Tuesday! Obey the `equals` contract

Effective Java Tuesday! Obey the `equals` contract

Reactions 21 Comments 3
7 min read
Effective Java Tuesday! Obey the `hashCode` contract

Effective Java Tuesday! Obey the `hashCode` contract

Reactions 15 Comments
3 min read
Effective Java Tuesday! Override `toString`

Effective Java Tuesday! Override `toString`

Reactions 6 Comments
2 min read
Effective Java Tuesday! Override `clone` judiciously

Effective Java Tuesday! Override `clone` judiciously

Reactions 10 Comments
5 min read
Effective Java Tuesday! Consider Implementing `Comparable`

Effective Java Tuesday! Consider Implementing `Comparable`

Reactions 10 Comments 2
4 min read
Effective Java Tuesday! Minimize the Accessibility of Classes and Member

Effective Java Tuesday! Minimize the Accessibility of Classes and Member

Reactions 5 Comments
5 min read
Effective Java Tuesday! In Public Classes, Use Accessors, Not Public Fields

Effective Java Tuesday! In Public Classes, Use Accessors, Not Public Fields

Reactions 7 Comments
2 min read
Effective Java Tuesday! Minimize Mutability

Effective Java Tuesday! Minimize Mutability

Reactions 11 Comments
5 min read
Effective Java Tuesday! Favor Composition Over Inheritance

Effective Java Tuesday! Favor Composition Over Inheritance

Reactions 8 Comments 1
4 min read
Effective Java Tuesday! Design and Document Classes for Inheritance or Else Prohibit It.

Effective Java Tuesday! Design and Document Classes for Inheritance or Else Prohibit It.

Reactions 6 Comments
4 min read
Effective Java Tuesday! Prefer Interfaces to Abstract Classes

Effective Java Tuesday! Prefer Interfaces to Abstract Classes

Reactions 8 Comments
3 min read
Effective Java! Design Interfaces for Posterity

Effective Java! Design Interfaces for Posterity

Reactions 3 Comments
2 min read
Effective Java! Use Interfaces Only to Define Types

Effective Java! Use Interfaces Only to Define Types

Reactions 6 Comments
2 min read
Effective Java! Prefer Class Hierarchies to Tagged Classes

Effective Java! Prefer Class Hierarchies to Tagged Classes

Reactions 12 Comments 2
3 min read
Effective Java! Favor Static Members Classes over Non-Static

Effective Java! Favor Static Members Classes over Non-Static

Reactions 6 Comments 1
3 min read
Effective Java! Limit Source Files to a Single Top-Level Class

Effective Java! Limit Source Files to a Single Top-Level Class

Reactions 4 Comments
2 min read
Effective Java! Don't Use Raw Types

Effective Java! Don't Use Raw Types

Reactions 14 Comments 1
4 min read
Effective Java! Elminate Unchecked Warnings

Effective Java! Elminate Unchecked Warnings

Reactions 5 Comments
2 min read
Effective Java! Prefer Lists to Array

Effective Java! Prefer Lists to Array

Reactions 6 Comments
3 min read
Effective Java! Favor Generic Types

Effective Java! Favor Generic Types

Reactions 6 Comments
3 min read
Effective Java! Favor Generic Methods

Effective Java! Favor Generic Methods

Reactions 30 Comments 1
3 min read
Effective Java! Use Bounded Wildcards to Increase API Flexibility

Effective Java! Use Bounded Wildcards to Increase API Flexibility

Reactions 11 Comments
7 min read
Effective Java! Combine Generics and Varargs Judiciously

Effective Java! Combine Generics and Varargs Judiciously

Reactions 5 Comments
6 min read
Effective Java! Consider Typesafe Hetergenous Containers

Effective Java! Consider Typesafe Hetergenous Containers

Reactions 5 Comments
3 min read
Effective Java! Use Enums Instead of int Constants

Effective Java! Use Enums Instead of int Constants

Reactions 8 Comments 2
8 min read
Effective Java! Use Instance Fields Instead of Ordinals

Effective Java! Use Instance Fields Instead of Ordinals

Reactions 5 Comments
2 min read
Effective Java! Use EnumSet Instead of Bit Fields

Effective Java! Use EnumSet Instead of Bit Fields

Reactions 6 Comments 2
2 min read
Effective Java! Use EnumMap instead of Ordinal Indexing

Effective Java! Use EnumMap instead of Ordinal Indexing

Reactions 9 Comments
2 min read
Effective Java! Emulate Extensible Enums With Interfaces.

Effective Java! Emulate Extensible Enums With Interfaces.

Reactions 7 Comments
2 min read
Effective Java! Prefer Annotations to Naming Patterns

Effective Java! Prefer Annotations to Naming Patterns

Reactions 7 Comments
6 min read
Effective Java! Consistently Use the Override Annotation

Effective Java! Consistently Use the Override Annotation

Reactions 6 Comments
2 min read
Effective Java! Use Marker Interfaces to Define Types

Effective Java! Use Marker Interfaces to Define Types

Reactions 2 Comments 5
2 min read
Effective Java! Perfer Lambdas to Anonymous Classes

Effective Java! Perfer Lambdas to Anonymous Classes

Reactions 7 Comments
3 min read
Effective Java! Prefer Method References to Lambdas

Effective Java! Prefer Method References to Lambdas

Reactions 5 Comments
2 min read
Effective Java! Favor the Use of Standard Functional Interfaces

Effective Java! Favor the Use of Standard Functional Interfaces

Reactions 7 Comments
3 min read
Effective Java! Use Stream Judiciously

Effective Java! Use Stream Judiciously

Reactions 7 Comments
3 min read
Effective Java! Prefer Side-Effect-Free Functions in Streams

Effective Java! Prefer Side-Effect-Free Functions in Streams

Reactions 4 Comments
3 min read
Effective Java! Prefer Collection To Stream as a Return Type

Effective Java! Prefer Collection To Stream as a Return Type

Reactions 1 Comments
2 min read
Effective Java! Use Caution When Making Streams Parallel

Effective Java! Use Caution When Making Streams Parallel

Reactions 3 Comments 1
3 min read
Effective Java! Check Parameters for Validity

Effective Java! Check Parameters for Validity

Reactions 2 Comments 2
2 min read
Effective Java! Make Defensive Copies When Necessary

Effective Java! Make Defensive Copies When Necessary

Reactions 7 Comments
3 min read
Effective Java! Design Method Signatures Carefully

Effective Java! Design Method Signatures Carefully

Reactions 5 Comments 2
3 min read
Effective Java! Use Overloading Judiciously

Effective Java! Use Overloading Judiciously

Reactions 7 Comments
2 min read
Effective Java! Use Varargs Judiously

Effective Java! Use Varargs Judiously

Reactions 7 Comments
2 min read
Effective Java! Return Empty Collections or Arrays, Not Nulls

Effective Java! Return Empty Collections or Arrays, Not Nulls

Reactions 7 Comments
2 min read
Effective Java! Return Optionals Judiciously

Effective Java! Return Optionals Judiciously

Reactions 13 Comments
4 min read
Effective Java: Write Doc Comments For All Exposed APIs

Effective Java: Write Doc Comments For All Exposed APIs

Reactions 4 Comments 2
2 min read
Effective Java: Minimize The Scope of Local Variables

Effective Java: Minimize The Scope of Local Variables

Reactions 7 Comments
2 min read
Effective Java: Prefer for-each loops to traditional for loops

Effective Java: Prefer for-each loops to traditional for loops

Reactions 3 Comments
2 min read
Effective Java: Know and Use the Libraries

Effective Java: Know and Use the Libraries

Reactions 8 Comments 1
3 min read
Effective Java: Avoid Float and Double If Exact Answers Are Required

Effective Java: Avoid Float and Double If Exact Answers Are Required

Reactions 4 Comments
2 min read
Effective Java: Prefer Primitive Types to Boxed Types

Effective Java: Prefer Primitive Types to Boxed Types

Reactions 6 Comments
3 min read
Effective Java: Avoid Strings When Other Types Are More Appropriate
Cover image for Effective Java: Avoid Strings When Other Types Are More Appropriate

Effective Java: Avoid Strings When Other Types Are More Appropriate

Comments
1 min read
Effective Java: Beware the Performance of String Concatenation
Cover image for Effective Java: Beware the Performance of String Concatenation

Effective Java: Beware the Performance of String Concatenation

Reactions 4 Comments 2
1 min read
Effective Java: Refer to Objects By Their Interfaces

Effective Java: Refer to Objects By Their Interfaces

Reactions 5 Comments
2 min read
Effective Java: Prefer Interfaces To Reflection

Effective Java: Prefer Interfaces To Reflection

Comments
2 min read
Effective Java: Use Native Methods Judiciously

Effective Java: Use Native Methods Judiciously

Comments
2 min read
Effective Java: Optimize Judiciously

Effective Java: Optimize Judiciously

Reactions 1 Comments
2 min read
Effective Java: Adhere to Generally Accepted Naming Conventions

Effective Java: Adhere to Generally Accepted Naming Conventions

Reactions 3 Comments
3 min read
Effective Java: Use Exceptions for Only Exceptional Circumstances

Effective Java: Use Exceptions for Only Exceptional Circumstances

Reactions 2 Comments
3 min read
Effective Java: Use Checked Exceptions for Recoverable Conditions

Effective Java: Use Checked Exceptions for Recoverable Conditions

Reactions 2 Comments
2 min read
Effective Java: Avoid Unnecessary Use of Checked Exceptions

Effective Java: Avoid Unnecessary Use of Checked Exceptions

Reactions 2 Comments
2 min read
Effective Java: Favor The Use of Standard Exceptions

Effective Java: Favor The Use of Standard Exceptions

Reactions 2 Comments
4 min read
Effective Java: Throw Exceptions Appropriate To The Abstraction

Effective Java: Throw Exceptions Appropriate To The Abstraction

Reactions 2 Comments
3 min read
Effective Java: Document All Exceptions Thrown By Each Method

Effective Java: Document All Exceptions Thrown By Each Method

Reactions 2 Comments
1 min read
Effective Java: Include Failure-Capture Information in Detail Messages

Effective Java: Include Failure-Capture Information in Detail Messages

Reactions 6 Comments
2 min read
Effective Java: Strive for Failure Atomicity

Effective Java: Strive for Failure Atomicity

Reactions 5 Comments
3 min read
Effective Java: Don't Ignore Exceptions

Effective Java: Don't Ignore Exceptions

Reactions 2 Comments
2 min read
Effective Java: Synchronize Access to Shared Mutable Data

Effective Java: Synchronize Access to Shared Mutable Data

Reactions 6 Comments
4 min read
Effective Java: Avoid Excessive Synchronization

Effective Java: Avoid Excessive Synchronization

Reactions 6 Comments
5 min read
Effective Java: Prefer Executors, Tasks, and Streams to Threads

Effective Java: Prefer Executors, Tasks, and Streams to Threads

Reactions 4 Comments
3 min read
Effective Java: Prefer Concurrency Utilities Over wait and notify

Effective Java: Prefer Concurrency Utilities Over wait and notify

Reactions 1 Comments
5 min read
Effective Java: Document Thread Safety

Effective Java: Document Thread Safety

Reactions 1 Comments
3 min read
Effective Java: Use Lazy Initialization Judiciously

Effective Java: Use Lazy Initialization Judiciously

Reactions 5 Comments
3 min read
Effective Java: Don't Depend on the Thread Scheduler

Effective Java: Don't Depend on the Thread Scheduler

Reactions 2 Comments
3 min read
Effective Java: Prefer Alternatives To Java Serialization

Effective Java: Prefer Alternatives To Java Serialization

Reactions 6 Comments
4 min read
Effective Java: Implement Serializable With Great Caution

Effective Java: Implement Serializable With Great Caution

Reactions 5 Comments
5 min read
Effective Java: Consider Using a Custom Serialized Form

Effective Java: Consider Using a Custom Serialized Form

Reactions 6 Comments
6 min read
Effective Java: Write readObject Methods Defensively

Effective Java: Write readObject Methods Defensively

Reactions 6 Comments
4 min read
Effective Java: For Instance Control, Prefer Enum types to readResolve

Effective Java: For Instance Control, Prefer Enum types to readResolve

Reactions 3 Comments
3 min read
Effective Java: Consider Serialization Proxies Instead of Serialized Instances

Effective Java: Consider Serialization Proxies Instead of Serialized Instances

Reactions 6 Comments
4 min read