in JAVA by
Q:
What are the main uses of this keyword?

1 Answer

0 votes
by

There are the following uses of this keyword.

this can be used to refer to the current class instance variable.

this can be used to invoke current class method (implicitly)

this() can be used to invoke the current class constructor.

this can be passed as an argument in the method call.

this can be passed as an argument in the constructor call.

this can be used to return the current class instance from the method.

Click here to read more about JAVA
Click here to read more about Insurance

Related questions

0 votes
asked Oct 11, 2020 in JAVA by SakshiSharma
+1 vote
asked Apr 12, 2020 in QuickTest Professional (QTP) by amita rallin
0 votes
asked Nov 14, 2020 in JAVA by rajeshsharma
0 votes
asked Dec 7, 2020 in JAVA by SakshiSharma
0 votes
asked Feb 8 in JAVA by SakshiSharma
...