Bear Bibeault wrote:The difference: one will work, the other will not compile.
I think he is talking about InterfaceB extends InterfaceA and ClassA implements InterfaceB or ClassA implements InterfaceA, InterfaceB, which will both compile...
When you make that decision just use common sense. If an interface adds to another interface and will in every case need the functionality the extended interface has, it makes sense to extend an interface.
Imagine an interface called DatabaseConnectionSupport which provides functionality to obtain and release a database connection.
Now you have another interface called DatabaseQuerySupport which gives functionality to perform basic database query needs.
So
makes perfect sense. Note that whenever you ship a DatabaseQuerySupport you also provide the ConnectionSupport.
If you have a Dog and a Cat interface it does not make sense to extend them and put them into one type hierarchy because they are simply two totally different things.