If the main method of java does not write public, why is there no Run "Sxh.main ()" when you right-click?

Mar.03,2021
The
main () method must be public


because the fact is that only the public static main (String []) method of public class can be run directly.
another explanation is that when you execute java MainClass at the terminal, only the MainClass method can be accessed with Public and Public, and
because no instance of the class has been created. The parameters of
terminal commands are string arrays, "java MainClass-a b" (["- a", "b"]) and so on, so parameters of type String [] are required.
as for the name main, it inherits from the convention of C language.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38564-2c0e8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38564-2c0e8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?