public class Point {
private int x, y;
public Point(int x, int y) {
/* missing */
this.y = y;
}
}Which line replaces /* missing */?
- A
this.x = this.x;
- B
x = x;
- Ccheck_circle
this.x = x;
- D
x = this.x;
Explanation
Use this.x to refer to the field shadowed by the parameter; otherwise the assignment is parameter-to-itself.