After reading gnat's answer to Why a static main method in Java and C#, rather than a constructor? I take his answer to mean that the purpose of a Java class with a static main method is to define a program entry point
and that it is not meant to be the program itself.
There may be a better way to do this, but I usually have the class with the static main method to do something simple like this:
public class MenuLauncher
{
public static void main(String[] args) {
Menu menu = new Menu();
menu.run();
}
}
Would the code above be the best practice for OOP where the class with static main doesn't do much more than launch or start program logic contained within a separate non-static object; after-all main is static so wouldn't the MenuLauncher class itself be very limited? Since main is a starting point I don't see any other purpose for the class other than to be a point of entry.
Is there a Java naming convention commonly used for classes that contain a main method and serve the purpose of being a program entry-point?