Skip to content
Sharp

Engineering Interviews · interview question

Which of the following is a key difference between interfaces and abstract classes in Java?

Multiple choiceMediumchapter-20-curatedpremiumengineering-interviewsjvm-trivia
Choose one answer
Answer and explanation

Correct answer

A. Interfaces cannot contain fields, while abstract classes can.

Why

Interfaces in Java cannot contain fields (except static final constants), while abstract classes can have instance variables. This difference influences how developers choose between using an interface or abstract class based on their design needs.

Test yourself on Engineering Interviews

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

Start free test
All Engineering Interviews questions →