What is modularity?

Before we move to Java Platform Module System, let's understand the meaning of modularity in the real world.

Modularity is a design that divides systems into smaller parts called a module. Nowadays, modular kitchens are installed in homes. These types of kitchen include several units or modules such as wall cabinets, cupboards, sinks, and many more and all these different parts are built in factories. If at any time there is damage in any unit, then only that module needs to be replaced or repaired.

Another familiar modular system is electric outlets in walls, which allow you to plug in different types of electrical gadgets such as microwaves, mixer grinders, refrigerators, televisions, and they are all designed to work ...

Get Java 9 Dependency Injection now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.