The author completely misunderstands the “main()” method of a Java class. The “main()” method represents the static entry point of an executable component, just as it does in C and C++. A Java class will compile fine without a “main()” method. Only a directly executable component such as an executable “jar” file requires the presence of a class with a “main()” method. The vast majority of Java classes do not contain a “main()” method.

I’m a US Army veteran of the Vietnam War, have a wonderful wife and family, am a working software engineer, and a committed citizen.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store