The Java Language Specification (the official specification of how Java works) describes in
section 12.1.4:
The method main must be declared public, static, and void. It must specify a formal parameter (ยง8.4.1) whose declared type is array of String.
So, it says the
main method
must be
public.
Some versions of Java also accept it if the
main method has default access, but formally, that's wrong. Always make your
main method
public.