PPT Slide
Solutions:
Rename the formal parameter:
public void setName (String strNewStringName) {
strName = strNewStringName;
} // of setName
Use the keyword this to refer to “current object”
public void setName (String strName) {
this.strName = strName;
} // of setName
Preventing Identifier Ambiguity
Previous slide
Next slide
Back to first slide
View graphic version