Which of the following demonstrates the implementation of inheritance in Java?

PYQ DSSSB 2025

Which of the following demonstrates the implementation of inheritance in Java?

  1. A.

    class B inherits A {}

  2. B.

    class A contains B {}

  3. C.

    class A implements B {}

  4. D.

    class A extends B {}

Attempted by 986 students.

Sign up free to check your answer

Sign up free

Explore the full course: Dsssb Tgt Computer Science Paper 2

Loading lesson…