Skip to content
Sharp

Design patterns · interview question

Which is a key benefit of using the Factory Pattern in software design?

Multiple choiceEasychapter-13-curatedpremiumdesign-patternsfactory-pattern
Choose one answer
Answer and explanation

Correct answer

C. It reduces code duplication by reusing the object instantiation logic.

Why

The Factory Pattern helps reduce code duplication by centralizing and reusing the object creation logic. It makes the code cleaner and more flexible to changes.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →