just a question too long to write it here

Hi, I'm new to Java, bla, bla, bla...I just had a question:What is the difference between having a private class inside of the main class that handles the events and a method inside the main class that does it?Thanks in advance.
[257 byte] By [S@brinaa] at [2007-10-3 5:22:26]
# 1

If you use an inner class

Your main class will not have to implement the event handler.

This is disairable if the super class of the main class has already implemented the event handler and written some code to handle the eventfrom some other sources. Or the sub classes of your main class might implement the event handler.

Basicaly it removes the risk of getting the event handling code overriden.

LRMKa at 2007-7-14 23:29:29 > top of Java-index,Java Essentials,New To Java...