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.
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.
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.