Skip to content
Sharp

Design patterns · interview question

In which scenario might the Factory Pattern be more suitable than the Builder Pattern?

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

Correct answer

C. When the primary concern is the type of object being created, not its construction process.

Why

The Factory Pattern is more suitable when the focus is on creating different types or families of objects, whereas the Builder Pattern is better for constructing a complex object step-by-step.

Test yourself on Design patterns

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

Start free test
All Design patterns questions →