In OOP, what is the purpose of the "this" keyword?

PYQ Bihar STET 2024

In OOP, what is the purpose of the "this" keyword?

  1. A.

    To create a new instance of a class

  2. B.

    To refer to the superclass

  3. C.

    To call a static method

  4. D.

    To refer to the current instance of a class

Attempted by 837 students.

Sign up free to check your answer

Sign up free

Explore the full course: Bihar Stet Computer Science Complete Course

Loading lesson…