Java immutable classes?
<p>I found an <a href="http://viralpatel.net/blogs/2010/02/most-useful-java-best-practice-quotes-java-developers.html">article</a> with an interesting piece of code:</p>

<pre><code>public class Employee {

    private String firstName;
    private String lastName;

    //private default constructor
    private Employee(String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
    }

    public static Employee valueOf (String firstName, String lastName) {
        return new Employee(firstName, lastName);
    }
}
</code></pre>

<p>I am really curious in understanding the advantage of creating this kind of classes. 
I understand that here that an object of this class would be immutable, because there is no way of changing its variable values once initialized. I never did something like this before, and i dont really understand the advantage of it. </p>

<ul>
<li>Why is it a good practice?</li>
<li>Could you name a situation where this approach can be used?</li>
<li>What about constants or read only variables? Is not that very similar?</li>
<li>In the article says, that this is not good for the performance of the application. <strong>But why</strong>? </li>
</ul>
