1.

What is "this" keyword in java? Explain

Answer»

It is a reference VARIABLE that REFERS to the CURRENT OBJECT. It can be used as follows:

  • To refer instance variable of class
  • To invoke class constructor
  • Passed as an argument in METHOD call
  • Passed as an argument in the constructor call
  • Used to return a class instance


Discussion

No Comment Found