Unlock the Power of Open Source! The " Linux New " SWAYAM Plus Course is live now and about 2,500 learners have already registered for it.

If you are a registered learner, the forum page is now active. Visit the page and get all your questions answered.

Using this keyword - English

13400 visits



Outline:

Using this keyword *this is a reference to the current object *helps to avoid name conflicts *we can use this keyword inside a constructor to call another one *the constructors must be in the same class *explicit constructor invocation *Explain it using the parameterized constructor code *Make this statement the last one in the constructor *You will get an error *this statement should be the first one inside a constructor