Using this keyword - English

10309 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