#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    254
    Rep Power
    13

    What does "this" mean?


    I know "this" means this, but what is this? When you write an applet, "this" refers to the applet? e.g.

    gBuffer.drawImage (back, 0, 0, this);


    Then when you write a class what does "this" refer to? e.g


    public void setPosition(int x, int y)
    {
    this.x=x;
    this.y=y;
    }

    What is "this"?
    Thank you for any help.
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    India
    Posts
    7
    Rep Power
    0
    the keyword "this" refers to the current object...

IMN logo majestic logo threadwatch logo seochat tools logo