A mutable can be modified after it is created.
In Java, a set only checks for equality of an object with objects already in the set only at insertion …