Immutable Objects Exercises
The goal of this exercise is to get comfortable creating immutable objects.
Overview of the Exercise
In this exercise you will create an object “ImmutablePerson” with the following characteristics:
- Required first name
- Optional middle name
- Required last name
- Optional list of nicknames
Solutions are available in src/main/java/solutions/basics/immutable/ImmutablePerson.java
Exercises
- Uncomment the tests in
src/test/java/exercises/basics/immutable/BasicImmutableTest.java
- Fill in the object
src/main/java/exercises/basics/immutable/ImmutablePerson.java
so that the tests pass