In the single inheritance world of Java, that's an expensive restriction. In 1.1, we can register listener objects that are notified when an event of interest to them is generated. If you're developing user interfaces with the 1.0 AWT and move to 1.1, you'll find that many parts of the old event model are deprecated and JavaSoft will be phasing them out. Inner classes JDK 1.0 allowed classes to be defined only in the scope of a package. You can now define classes in other scopes.
Inner classes are a handy feature for defining listeners.
This example shows how classes now can be defined in the scope of another class and access its members. Without inner classes, a separate class would have to obtain access to all the members of the parent class that it needed. To demonstrate the new event model, listeners are registered for each of the buttons. To be notified of button events, an object must implement the ActionListener interface and be registered with addActionListener . In this example, the SimpleListener and SerializeListener are defined as inner classes.