Difference between this and this() in Java with Example

In Java, both this and this() are entirely different with different functionalities. Functionalities (Purposes) this keyword is used to refer always current object this() is used to access one constructor from another where both constructors belong to the same class Following table illustrates the differences. this keyword this() Used with objects only Used with constructors …

Difference between this and this() in Java with Example Read More »