java this keyword

Java Made Clear: Difference between this and super Example

Basically, both this vs super Java are keywords performing different jobs. this keyword refers an object super keyword refers a super class variable or method A) Meaning, Purpose and Usage of this Keyword this refers an object, that too, a current object. What is current object? To understand better, let…

Java this keyword Purpose and Meaning Example

Before explaining Java this keyword, first let us see the problem then we will see a solution. Sometimes in coding of any language including Java, local variable may clash with instance (global) variable. That is, both local variable and instance variable are same. If same, an unexpected result occur. Observe…