November 18, 2018

Using java streams to create immutable class

In my post – How to create immutable classes – to make lists immutable, I created a new List-Object everytime. This is the class which, we are going to modify in this tutorial. package immutable; import java.util.ArrayList; import java.util.Date; import java.util.List; final public class Person { private int age; private String name; private Date dateOfBirth; private […]

Read more