John Quach wrote:
Is there another argument other than "this" that this method call will accept in the LoginImplementAL?
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." - George Bernard Shaw
Ron Ingram wrote:I also think a good use is a case where you have an instance variable and a local variable.. you would use "this" for the local variable to make a determination between the two.
Riaan Nel wrote:Maneesh gave you a great explanation on the this keyword already, but I would like to add to that.
Generally, this serves little purpose apart from assisting with the readability of your code when it's used in the below context. Method calls and variable assignments will always work with the object instance in which they are called, regardless of whether or not you specify this.
Bear Bibeault wrote:I always prefix references to instance variables with this. whether its required or not. This makes references to instance variables consistent throughout the class code. I don't like things meaning something different depending upon context.
Some people hate this style, but it's entirely up to you.
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|