Which keyword is used in Java to inherit a class?

2024

Which keyword is used in Java to inherit a class?

Answer: B. extendsIn Java, the extends keyword is used when a class inherits from another class.

  1. A.

    inherits

  2. B.

    extends

  3. C.

    implements

  4. D.

    super

  5. E.

    Question not attempted

Attempted by 542 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: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…