In <code>public Dog(String name) { this.name = name; }</code>, what is <code>this.name</code>?
- A
A static field
- B
The parameter
- C
Compile error
- Dcheck_circle
The instance variable (distinguished from parameter)
Explanation
<code>this.name</code> refers to the instance field; <code>name</code> alone refers to the parameter (which shadows the field).