Why my code not giving compile error?
<p>In the below code i am assigning data to final object .But not getting the compile error .</p>

<pre><code>class Name {
    private String name;

    public Name (String s) {
        this.name = s;
    }

    public void setName(String s) {
        this.name = s;
    }
}

private void test (final Name n) {
    n.setName("test");//here exception coming but not giving compile error
}
</code></pre>
