Jump to content
  • Advertisement
Sign in to follow this  
Nicholas Kong

What do you call the Java class that has the main method?

This topic is 1948 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I learned programming by just calling it the "class that has the main method" which sounds cumbersome. Is there a word that describes this definition in the programming world?

 

Another question, what do you name your java class that has the main method so people can find which java class is the entry point a lot easier?

Edited by warnexus

Share this post


Link to post
Share on other sites
Advertisement

I use the following naming scheme.

 

ProjectRootPackage.ProjectNameBootstrap

 

E,g .: If I had a project named Test and its root package its named com.bubsy.test I would the class which have the main method com.bubsy.test.TestBootstrap

Share this post


Link to post
Share on other sites

When I am forced to use Java, I refer to it as the "Main Class" and name it "Main".

 

Using something more is overkill, and it's consistent with naming schemes for every other language.

Share this post


Link to post
Share on other sites

When I am forced to use Java, I refer to it as the "Main Class" and name it "Main".

 

Using something more is overkill, and it's consistent with naming schemes for every other language.

Thanks

Share this post


Link to post
Share on other sites
I usually refer to it colloquially as "the main class" but I typically name the class Program and/or I include the name of the application, e.g. ChatClientProgram.

I have seen people name it Application, App and Main. I happen to like Program and this is what Visual Studio names the equivalent class when making a new C# application.

Share this post


Link to post
Share on other sites
The Java specification calls the it the "initial class", but I rarely hear people refer to it as such in conversation.

Share this post


Link to post
Share on other sites
It is your project's boot entry point, containing the most unsharable code specific to this project only. You might as well call it MyKillerApp.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!