Which keyword is used in Java to inherit a class?

2024

Which keyword is used in Java to inherit a class?

  1. A.

    inherits

  2. B.

    extends

  3. C.

    implements

  4. D.

    super

  5. E.

    Question not attempted

Attempted by 125 students.

Show answer & explanation

Correct answer: B

In Java, the extends keyword is used when a class inherits from another class.

Explore the full course: Up Lt Grade Assistant Teacher 2025