Java Design Pattern

Immutable Class in Java

Immutable Class in Java

Ashish Lahoti

In this tutorial, we’ll learn about Immutable Class and its benefits in thread-safety, caching and collections. We will also look at rules to create immutable classes and eventually we’ll write an Immutable Class from scratch in Java.