Encapsulation in Java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/114237/considering-object-encapsulation-should-getters-return-an-immutable-property">Considering object encapsulation, should getters return an immutable property?</a>  </p>
</blockquote>



<p>Does encapsulation mandate immutability of the class?</p>

<pre><code>Class Employee{
  private Date hireDate;
  public Date getHireDate(){
   return hireDate;
  }
}
</code></pre>

<p>In Some client Method:</p>

<pre><code>Employee emp = new Employee();
Date temp = emp.getHireDate();
temp.setTime(...);//The Hiredate of the employee would be corrupted...
</code></pre>
