1

Do subclasses of a class which implements Cloneable need also implement it explicitly?

I read some discussions about this (Do subclasses inherit interfaces?) but the answers are not very clear.

webpersistence
  • 894
  • 3
  • 12
  • 29

1 Answers1

2

No. Subclasses will inherit interfaces that their superclasses implement, and thus implicitly also implement the interface. However, it is arguably a better practice to explicitly enumerate the interfaces any given class implements.

See also What does it mean to “program to an interface”?

Elliott Frisch
  • 198,278
  • 20
  • 158
  • 249