• Post Reply Bookmark Topic Watch Topic
  • New Topic

Packages less class  RSS feed

 
Ryan Waggoner
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read in quite a few places, that you never want to create a class that does not belong to a package. I like this idea, and practice it.

My question was about the entry point to a program. Should this also be in a package like everything else?
 
Bill Cruise
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The entry point to a program in Java is always a part of a class. Specifically it is the main method of some class. So if you stick with the practice of always putting your classes in a package then the entry points to all you programs will "inherit" this property.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!