posted 19 years ago
Real Java applications often consist of hundreds if not thousands of classes; only one of those needs to have a main() routine. The main() is generally used just to create a few objects, hook them up, and start some threads.
Of course, these days, there are far more "Web applications" than desktop applications; in these, the programmer doesn't write any main() at all. The main() routine is inside the application server, and the "webapp" programmer simply write classes that implement specific interfaces to create an application.
The only time you'll generally see an entire application written as one class is in a student program; programs in the real world are virtually never like that.