This question has been deleted and is no more available to answer.
1
Why modules are created in java if we already have packages?

Share using link:

Direct share:

May 22 at 20:22:8
Yellow
Yellow
391

1 Answer

1
Modules give more power to Java. The main objective of the module to properly organize the lengthy source code so, it prevents the complexity of handling the large scaled applications.

A simple answer to your question is let say you are programming a large application that contains multiple packages. So later when you do changes you will get confused between the packages to be updated, then modules come into action.

Modules are used to group the packages into one namespace, and additionally, it allows you to declare multiple packages with a single name but their namespaces will different to prevent the scenario of conflicting.

One more thing, you can include only the source code that your application needs and can ignore the source code that is not necessary for your application which makes your application lightweight and optimized. This feature is more useful when you working for the application for IoT(Internet Of Things).
May 22 at 20:34:11
Jude
Jude
476

yes, modules are very useful to organize the source code into sections. thanks!!!Yellow Daddy May 22 at 20:29:7

Asked
5 months ago
Viewed
132 times