Question 135Asked in BPSC TRE 3.0 (2024) Computer Science Class 11-12

Which keyword is used in Java to implement inheritance?

  1. Aextends
  2. Binherits
  3. Cimplements
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (A) extends

Explanation

Java uses extends for class inheritance (class B extends A). implements is used with interfaces, and inherits is not a Java keyword.

From BPSC TRE 3.0 (2024) Computer Science Class 11-12 — Previous Year Paper

This is question 135 of BPSC TRE 3.0 (2024) Computer Science Class 11-12 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.