While choosing a package name you need to keep the following points in mind.
You can declare a package as in.
package com.mypackage.tutorialspoint; Public class Sample { Public static void main(String args[]) { System.out.println("Welcome to Tutorialspoint"); } }
You need to compile the file with packages using –d option as:
C:\Sample>javac -d . PackageExample.java
After compiling, you can see the class files of the class created in the location com/mypackage/tutorialspoint.