Java Language Packages

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


package in java is used to group class and interfaces. This helps developer to avoid conflict when there are huge numbers of classes. If we use this package the classes we can create a class/interface with same name in different packages. By using packages we can import the piece of again in another class. There many built in packages in java like > > > We can define our own user defined packages.


Packages provide access protection.

package statement must be first line of source code. There can only be one package in one source file.

With help of packages conflict between different modules can be avoided.

Got any Java Language Question?