Packages

  • Eclipse: Oxygen
  • Java: 1.8

It is a way to group many classes belonging to a specific project.  A package is like a folder of similar things such as music or a folder of movies. The package adds a different level of inheritance, this level of inheritance is by default applied to all the members created in the method. Hence a package is a useful and efficient entity in java.  The package also has a naming convention which we have studied earlier. We can also import the packages which will result in accessing all the classes and methods in it.

Output

Blogging..

Output

Blogging..

Output

Blogging..

It is a way of grouping many classes that belong to a specific project. A package is like a folder of similar things, like music or a movie folder.

The package adds a different level of inheritance, this inheritance level is applied by default to all members created in the method. Therefore, a package is a useful and efficient entity in Java. The package also has a naming convention that we have studied previously. We can also import the packages that will give access to all the classes and methods in it.
A package is imported and hence used in other class. Also, various ways to import classes is shown here.

Output

Blogging..
Platform..

Output

Blogging..
Platform..

Output

Blogging..
Platform..

Contributed by: Poonam Tomar


VIEW COURSES

Buy me a coffee!

 

PayTM QR (INDIA)

  • Get video tutorials
  • Project files set
  • Get Certified

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu