Question discussion

Which keyword is used in Java to inherit the properties of a class into another class?

1978Medium DSSSB TGT Computer Science 0 replies 1 views
0

Which keyword is used in Java to inherit the properties of a class into another class?

  • Aimplements
  • Bextends
  • Cinherits
  • Dsuper
Correct answer: B

Explanation

A subclass uses the 'extends' keyword to inherit from a superclass, while 'implements' is used for interfaces.

Discussion 0

Nobody has replied yet. Start the discussion!