It is solely a matter of personal preference and style. Some programmers find that they always use the explicit readability of this , while others find it cluttering up the code without adding a value.
Most corporate coding guides indicate whether to use this or not, so you should try to follow the recommendation. If the project you are working on is for personal use, then it really depends on your preference for using this explicit or not.
In response to "Are there times when you should always use this ?" You should use it when necessary to avoid ambiguity, for example, if there is another variable with the same name in the scope. In particular, in java the constructor parameters very often use the same names as the fields of the class, which are then assigned using this.field = field .
source share