Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

What is the purpose of ‘this’ keyword in java?

Pragya Keshap answered on February 4, 2023 Popularity 6/10 Helpfulness 1/10

Contents


More Related Answers

  • how to use java
  • what can you do with java
  • this keyword in java
  • Java this Keyword
  • What is the use of the “static” keyword in Java?
  • what is java
  • what is java
  • new keyword in java
  • how to use the this keyword in java
  • what is java
  • What is Java?
  • what is java
  • java what is the meanning of <T>
  • \" meaning in java
  • what does % do in java
  • Java this Keyword
  • hi there in java
  • Java program to understand // the concept of == operator
  • /= java
  • what is java
  • what is java

  • What is the purpose of ‘this’ keyword in java?

    0

    In Java, ‘this’ keyword refers to current instance of the object.

    It is useful for differentiating between instance variables and local

    variables.

    It can be used to call constructors. Or it can be used to refer to the

    instance.

    In case of method overriding, this is used for falling the method of

    current class.

    https://www.w3schools.com/java/ref_keyword_this.asp#:~:text=The%20this%20keyword%20refers%20to,a%20method%20or%20constructor%20parameter).

    Popularity 6/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: java keyword
    Link to this answer
    Share Copy Link
    Contributed on Feb 04 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.