Skip to content
Sharp

Modern Java · interview question

Which is an advantage of using static factory methods in a large e-commerce application?

Multiple choiceMediumchapter-7-curatedpremiummodern-javastatic-factory-methods
Choose one answer
Answer and explanation

Correct answer

D. They provide improved instance control.

Why

In a large application, static factory methods allow for improved control over instance creation and management, which can lead to more efficient memory use and performance.

Test yourself on Modern Java

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

Start free test
All Modern Java questions →