Skip to content
Sharp

Core Java · interview question

In Java, which of the following statements about abstract classes and interfaces is correct?

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

Correct answer

D. Abstract classes can have constructors, interfaces cannot.

Why

Abstract classes can have constructors because they can contain state, whereas interfaces cannot. Interfaces can now have default methods with implementations, but traditionally did not.

Test yourself on Core Java

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

Start free test
All Core Java questions →