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

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

Effective Java Tuesday! The Builder Pattern!

24
Comments 2
4 min read
Effective Java Tuesday! Singletons!

Effective Java Tuesday! Singletons!

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

Effective Java Tuesday! Utility Classes!

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

Effective Java Tuesday! Prefer Dependency Injection!

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

Effective Java Tuesday! Avoid Creating Unnecessary Objects!

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

Effective Java Tuesday! Don't Leak Object References!

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

Effective Java Tuesday! Avoid Finalizers and Cleaners!

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

Effective Java Tuesday! Prefer try-with-resources

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

Effective Java Tuesday! Obey the `equals` contract

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

Effective Java Tuesday! Obey the `hashCode` contract

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

Effective Java Tuesday! Override `toString`

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

Effective Java Tuesday! Override `clone` judiciously

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

Effective Java Tuesday! Consider Implementing `Comparable`

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

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

8
Comments
2 min read
Effective Java Tuesday! Minimize Mutability

Effective Java Tuesday! Minimize Mutability

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

Effective Java Tuesday! Favor Composition Over Inheritance

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.

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

Effective Java Tuesday! Prefer Interfaces to Abstract Classes

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

Effective Java! Design Interfaces for Posterity

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

Effective Java! Use Interfaces Only to Define Types

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

Effective Java! Prefer Class Hierarchies to Tagged Classes

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

Effective Java! Favor Static Members Classes over Non-Static

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

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

Effective Java! Don't Use Raw Types

14
Comments 1
4 min read
Effective Java! Eliminate Unchecked Warnings

Effective Java! Eliminate Unchecked Warnings

6
Comments
2 min read
Effective Java! Prefer Lists to Array

Effective Java! Prefer Lists to Array

6
Comments
3 min read
Effective Java! Favor Generic Types

Effective Java! Favor Generic Types

6
Comments
3 min read
Effective Java! Favor Generic Methods

Effective Java! Favor Generic Methods

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

Effective Java! Use Bounded Wildcards to Increase API Flexibility

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

Effective Java! Combine Generics and Varargs Judiciously

5
Comments
6 min read
Effective Java! Consider Typesafe Heterogenous Containers

Effective Java! Consider Typesafe Heterogenous Containers

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

Effective Java! Use Enums Instead of int Constants

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

Effective Java! Use Instance Fields Instead of Ordinals

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

Effective Java! Use EnumSet Instead of Bit Fields

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

Effective Java! Use EnumMap instead of Ordinal Indexing

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

Effective Java! Emulate Extensible Enums With Interfaces.

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

Effective Java! Prefer Annotations to Naming Patterns

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

Effective Java! Consistently Use the Override Annotation

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

Effective Java! Use Marker Interfaces to Define Types

3
Comments 5
2 min read
Effective Java! Prefer Lambdas to Anonymous Classes

Effective Java! Prefer Lambdas to Anonymous Classes

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

Effective Java! Prefer Method References to Lambdas

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

Effective Java! Favor the Use of Standard Functional Interfaces

7
Comments
3 min read
Effective Java! Use Stream Judiciously

Effective Java! Use Stream Judiciously

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

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

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

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

Effective Java! Use Caution When Making Streams Parallel

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

Effective Java! Check Parameters for Validity

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

Effective Java! Make Defensive Copies When Necessary

8
Comments
3 min read
Effective Java! Design Method Signatures Carefully

Effective Java! Design Method Signatures Carefully

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

Effective Java! Use Overloading Judiciously

7
Comments
2 min read
Effective Java! Use Varargs Judiciously

Effective Java! Use Varargs Judiciously

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

Effective Java! Return Empty Collections or Arrays, Not Nulls

7
Comments
2 min read
Effective Java! Return Optionals Judiciously

Effective Java! Return Optionals Judiciously

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

Effective Java: Write Doc Comments For All Exposed APIs

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

Effective Java: Minimize The Scope of Local Variables

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

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

Effective Java: Know and Use the Libraries

9
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

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

Effective Java: Prefer Primitive Types to Boxed Types

9
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

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

Effective Java: Refer to Objects By Their Interfaces

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

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

Effective Java: Adhere to Generally Accepted Naming Conventions

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

Effective Java: Use Exceptions for Only Exceptional Circumstances

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

Effective Java: Use Checked Exceptions for Recoverable Conditions

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

Effective Java: Avoid Unnecessary Use of Checked Exceptions

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

Effective Java: Favor The Use of Standard Exceptions

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

Effective Java: Throw Exceptions Appropriate To The Abstraction

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

Effective Java: Document All Exceptions Thrown By Each Method

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

Effective Java: Include Failure-Capture Information in Detail Messages

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

Effective Java: Strive for Failure Atomicity

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

Effective Java: Don't Ignore Exceptions

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

Effective Java: Synchronize Access to Shared Mutable Data

6
Comments
4 min read
Effective Java: Avoid Excessive Synchronization

Effective Java: Avoid Excessive Synchronization

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

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

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

Effective Java: Prefer Concurrency Utilities Over wait and notify

1
Comments
5 min read
Effective Java: Document Thread Safety

Effective Java: Document Thread Safety

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

Effective Java: Use Lazy Initialization Judiciously

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

Effective Java: Don't Depend on the Thread Scheduler

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

Effective Java: Prefer Alternatives To Java Serialization

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

Effective Java: Implement Serializable With Great Caution

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

Effective Java: Consider Using a Custom Serialized Form

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

Effective Java: Write readObject Methods Defensively

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

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

Effective Java: Consider Serialization Proxies Instead of Serialized Instances

6
Comments
4 min read