> Java: "this" operator?

Java: "this" operator?

Posted at: 2014-12-18 
"this" *always* refers to the current object;

If a class that extends Applet has a method with "this" inside, then a) the method is not static, and b) the code is run after an instance of the class was declared and the method called on it elsewhere.

class Whetever extends Applet {

...

public void init() {

...

addActionListener(this); // *

...

}

}

// elsewhere...

Whatever w = new Whatever();

w.init();

* this refers to w here

not good at all

if this refers to the object that invoked the method, Why do i find some standalone classes with no objects declared of it and still they use "this" as a method argument.

ex: addactionListener(this);(in the Applet class)