Originally posted by Klaas Vredevort:
I had my program edited by some guy, and he put in the following lines of code:
How come I have to add this.* to the bold lines? Everything else works just fine without it.
Klaas
Your code might be inside a method, if i am not wrong. because your post is incomplete.
Any way, What i think , there is a variable named wordToPlayWith inside the method, which is local variable. And you also have a class variable with same name wordToPlayWith.
To remove the name conflict we use this . using this.wordToPlayWith refers to your class variable and not your local variable