<code>class Point { private int x, y; public Point(int x, int y) { this.x = x; this.y = y; } } </code></pre> Why use <code>this.</code>?
- A
Required by Java
- Bcheck_circle
Disambiguates between parameter <code>x</code> and field <code>x</code>
- C
For static methods
- D
Optimizes performance
Explanation
Without <code>this.</code>, both names refer to the parameter (shadowing).