Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But in Java, a program doesn't have a single static entry point. You can have as many different classes as you want, each with its own static void main, and choose which to use as the entry point when you start up your JVM.


You've just described separate programs that happen to be bundled together (in the same jar presumably).

Each invocation of the jvm requires that you specify the class for which a single static main exists. The other classes containing other static mains are irrelevant.


No they didn't. Seems like you arbitrarily redefined what a program means to argue.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: