Actually, some JREs allow main to be private. It's a weird quirk, so don't rely on it.

But what do you mean "why is main declared public"? It just is. That's the rule (except for the weird quirk...