Skip to content
Sharp

Modern Java · interview question

How would you explain a key advantage of using static factory methods over constructors in a Java interview?

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

Correct answer

A. They can have descriptive names.

Why

Static factory methods can have descriptive names that clearly convey the purpose of the object being created, improving code readability and maintainability.

Test yourself on Modern Java

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

Start free test
All Modern Java questions →