...
The resulting behavior can be classified as shadowing; the method variable renders the instance variable inaccessible within the scope of the method. For example, assigning to this.val
from within the method does not affect the value of the instance variable, although assigning to this.val
from within the method does.
Compliant Solution (Field Shadowing)
...