communication between classes
Imagine there are two classes (actually there five, but lets simplify the example). Class A, the top class, contains the final static-void-main method, and class B sets all GUI stuff (please do not ask me way). A button event of class A should trigger large sequences of things and the user (besides doing other things at the GUI panel of class B) could push the button at any time.
How should this be implemented? A wait loop at class A, will block other GUI activity of class B! The events of the object of class B, created at class A, are not noted right away to class A (events happen in class B).