[EFH]: Technically, I believe the answer is "yes".
I don't think it is. It's required that the main() method be public (which was originally not enforced by Sun's JVMs, but has been enforced since 1.4 I believe). However I don't see any requrement that the class be public. In fact the JLS has several examples in which the class is not public, but rather package. So I would say that the JVM is required to allow this. And testing confirms this is what JDK 5 does, at least.
[Arnb]: Is it necessary that the class in which the main() is defined have to be public ?
No. [ September 03, 2005: Message edited by: Jim Yingst ]