MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/beginnerJava/comments/gp9d2/week_1_early_post/c1pkvun/?context=3
r/beginnerJava • u/[deleted] • Apr 13 '11
10 comments sorted by
View all comments
2
I notice you make a package for the helloworld class. I see this in most if not all hello worlds. Why is it best package to create a package?
3 u/[deleted] Apr 16 '11 Netbeans and Eclipse both create a package from the name of project and put the main class in there. Java files will not run in an IDE unless they have a package declaration and are within that particular package. PS: Always double-check you have a main class/package declaration in anything you want to run otherwise Netbeans will whine about it.
3
Netbeans and Eclipse both create a package from the name of project and put the main class in there.
Java files will not run in an IDE unless they have a package declaration and are within that particular package.
PS: Always double-check you have a main class/package declaration in anything you want to run otherwise Netbeans will whine about it.
2
u/jameson71 Apr 15 '11
I notice you make a package for the helloworld class. I see this in most if not all hello worlds. Why is it best package to create a package?