Skip to content
Sharp

Design patterns · interview question

Which of the following best describes the role of a Factory Method in the Factory Pattern?

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

Correct answer

D. It centralizes the creation of objects and abstracts the instantiation process.

Why

The Factory Method centralizes object creation and abstracts it, which reduces the coupling between the client code and the objects it creates.

Test yourself on Design patterns

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

Start free test
All Design patterns questions →