Skip to content
Sharp

Object-oriented programming · interview question

What keyword is used to inherit from a class in Java?

Multiple choiceEasychapter-5-curatedpremiumoopcomposition-vs-inheritance
Choose one answer
Answer and explanation

Correct answer

D. Extends

Why

In Java, the 'extends' keyword is used to specify that a class is inheriting from a superclass.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →