title: How can we maintain Immutability of a class with a mutable reference
body: <p>I know all the basic rules to make our class immutable but I am a little confused when there is another class reference. I know if there is collection instead of <code>Address</code> then we can make use of <code>Collections.unmodifiableList(new ArrayList&lt;&gt;(modifiable));</code> and then we can make our class immutable. But in below case I am still unable to get the concept.</p>
  
  <pre><code>public final class Employee{
      private final int id;
      private Address address;
      public Employee(int id, Address address)
      {
          this.id = id;
          this.address=address;
      }
      public int getId(){
          return id;
      }
      public Address getAddress(){
          return address;
      }
  }
  
  public class Address{
      private String street;
      public String getStreet(){
          return street;
      }
      public void setStreet(String street){
          this.street = street;
      }
  }
  </code></pre>