Jump to content

View more

Image of the Day

「筋肉兄貴のスーパーラン!」
夕焼けにガラス・・・(´・ω・`)
ガラスは割りたいでしょうけど、割ったらクリアできないですよ。
(o・ω・o)
 #indiedev  #indiegame #screenshotsaturday https://t.co/fhKO5NJ5ee
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

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

2: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
7 replies to this topic

#1 warnexus   Prime Members   

1535
Like
1Likes
Like

Posted 22 February 2013 - 06:46 PM

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, 22 February 2013 - 06:55 PM.


#2 Bubsy   Members   

407
Like
0Likes
Like

Posted 22 February 2013 - 07:21 PM

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



#3 Khatharr   Members   

8462
Like
0Likes
Like

Posted 22 February 2013 - 07:35 PM

"Fred".


void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#4 Geometrian   Members   

1810
Like
2Likes
Like

Posted 22 February 2013 - 07:38 PM

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.


And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.

#5 warnexus   Prime Members   

1535
Like
0Likes
Like

Posted 22 February 2013 - 08:38 PM

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



#6 dmatter   Members   

4624
Like
2Likes
Like

Posted 22 February 2013 - 08:41 PM

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.

#7 SiCrane   Moderators   

11703
Like
1Likes
Like

Posted 23 February 2013 - 06:12 AM

The Java specification calls the it the "initial class", but I rarely hear people refer to it as such in conversation.

#8 Nercury   Members   

812
Like
0Likes
Like

Posted 23 February 2013 - 07:11 AM

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.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.