Textbook claims can use age=age instead of this.age = age in ctor, when is this correct?
<p>For this class,</p>

<pre><code>class Person {
    int age;
    public Person(int age) {
        this.age = age;
    }
}
</code></pre>

<p>In my textbook, the author tells me that it's also OK to write age=age to replace this.age=age.</p>

<p>He says, if the parameter and the data member have the same name, the left side of the assignment symbol will be treated as the data member of the class, and the right side is the parameter. </p>

<p>I have jdk1.7 installed on my computer, and codes like age=age has no effect. In which version of Java does that work?</p>
