Java "events" - nothing more than Interfaces. Why pretend it is Events when it is just a normal Interface and classes that implements that interface?
<p>I am mainly developing in .NET C# and I love the Events in C#.</p>

<p>Im now doing som Android stuff and thus must deal with Java. When porting some code from C# to Java I ran into the problem of Events; Java does not have anything that corresponds to C# Events.</p>

<p>So, when reading up on how Java handles "events", the only thing I can conclude is that it doesnt. There is no such thing as "events" in Java. Instead they use normal Interfaces and classes that implement those interfaces.</p>

<p>In Java:
First, you have to first create the Interface
Then, all classes that want to listen to the "event" has to implement that interface.
Then, the class that fires the "event" has to keep a list of all listeners (Array of some sort)
Then, the class that fires the "event" has to have a method so that listeners can add themselves to the Array</p>

<p>And when the firing class decides to "fire the event", it has to iterate through the Array of the listeners, calling the methods.</p>

<p>That is just plain Interface-usage, not Events in my world.</p>

<p>Am I wrong?</p>
