Skip to content
Sharp

Core Java · interview question

Given a static factory method in a class Product, how does it improve object creation over constructors?

Multiple choiceMediumchapter-7-curatedpremiumcore-javacode-reading-with-modern-java
Choose one answer
Answer and explanation

Correct answer

C. Allows more descriptive names

Why

Static factory methods can have descriptive names, improving code readability and understanding over traditional constructors, which are limited to the class name.

Test yourself on Core Java

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

Start free test
All Core Java questions →