Examveda
Examveda

What is the purpose of the "this" keyword in Java constructors and methods?

A. To refer to the current instance of the class

B. To call another method

C. To declare a local variable

D. To indicate a static method

Answer: Option A


This Question Belongs to Java Program >> Constructors And Methods

Join The Discussion

Comments ( 1 )

  1. Manish J
    Manish J :
    7 months ago

    this keyword is used to differentiate between local variable and data members.
    this keyword will point towards the current object that is under execution .

Related Questions on Constructors and Methods

What is a constructor in Java?

A. A special method to create instances of classes

B. A method used for mathematical calculations

C. A method to perform string manipulations

D. An exception handling mechanism