Reputation: 277
In this How Default Package is Created where class file is stored
class Package
{
public static void main(String[] args) {
System.out.println("Default Package");
}
}
Upvotes: 1
Views: 468
Reputation: 1159
The default package location is located in the source folder of your project. If we are talking about java then that is just a package without name.
You can see this even better if you try to compile things without an IDE like this
javac Package.java
which results in a Package.class file. And if you run:
java Package
You will get
Default Package
As expected. And as you will see, there is no package directory created and everything works.
Using Java in the command line helps a lot understanding these commands and to learn how to use it checkout out these links:
Upvotes: 0
Reputation: 358
When we create a java class and do not mention any package name for creating this particular class within any java/web project the eclipse /netbeans will automatically create the default package.
Upvotes: 2