Skip to content
Sharp

Core Java · interview question

Why do teams use an abstract class in Java in production code?

Multiple choiceEasychapter-5-curatedpremiumcore-javacode-reading-with-related-types
Choose one answer
Answer and explanation

Correct answer

B. To provide a common template for multiple subclasses.

Why

Abstract classes serve as a template providing common behavior and structure for subclasses, allowing shared code and requiring subclasses to implement specific details.

Test yourself on Core Java

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

Start free test
All Core Java questions →