By differentiating fields from parameters with the same name.
In methods where parameters share the same name as class fields, 'this' is used to clarify that you mean the class field. For example, in a `Product` class, `this.price = price;` correctly assigns a parameter to the field, resolving the conflict.
Additional Notes
How can ‘this’ be used to resolve naming conflicts in Java methods?