Practice mode Java

Which keyword does a Java class use to inherit from another class?

Correct answer D. extends

Explanation

A subclass is declared with extends, for example class Car extends Vehicle. Java allows a class to extend only one class directly.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.