Suggest an editImprove this articleRefine the answer for “How does Factory Method contribute to system extensibility?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Factory Method** differs from a plain constructor in that it delegates choosing the specific class and creating the object to subclasses or external logic, while a constructor always creates a strictly defined object. **Key point:** adding a new type with a constructor requires rewriting the client code, while with a factory method it is enough to create a new subclass with the needed implementation.Shown above the full answer for quick recall.Answer (EN)Image**Factory Method** differs from a plain constructor in that it **delegates choosing the specific class** and the object-creation process **to subclasses or external logic**, whereas a **constructor** always creates a strictly defined object. --- ### 1. **Control over creation** - **Constructor** - hard-fixed: `new Car()` always creates a `Car`. - **Factory Method** - lets you decide *at runtime* which object to create: ```java Transport t = createTransport(); // could be a Truck or a Ship ``` --- ### 2. **Flexibility** - A constructor cannot be overridden. - A factory method can be inherited and have its behavior changed without touching the rest of the code. --- ### 3. **Encapsulating the creation logic** - A constructor does not hide the creation process. - A factory method can include complex logic: validation, caching, choosing a type based on data. --- ### 4. **Extensibility** - Adding a new type with a constructor requires rewriting the client code. - With a factory method, it is enough to create a new subclass with the needed implementation. --- **Summary:** A constructor is *direct creation of a specific object*. Factory Method is *a mechanism for choosing and creating a suitable object without tying it to specific classes*, which makes the architecture more flexible and scalable.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.