Daniel Pitts wrote, quoted or indirectly quoted someone who said :
Roedy said:
or classes that extend an abstract class. For rules of thumb on which
way to go, see
http://mindprod.com/jgloss/interfacevsabstract.html
Your site makes interfaces sound so weak and useless, and provides some
misinformation regarding them.
For one thing, you say that only classes establish an /is-a/ relationship.
Something that implements an interface /is-a/ that interface.
You go so far as to state that at least for some implementations of an
interface, "[t]o them, your interface is only incidental, something that have
to add on to the their code to be able to use your package." Nothing could be
further from the truth, or more damaging to gaining the full power of
interfaces. There is nothing incidental about implementation of an interface.
Interfaces, in concert with generics, establish contracts and type structures
which force implementations to adhere, in a way that the compiler enforces,
thus preventing slews of bugs.
They provide that type safety and power while maximizing the flexibility to
adjust implementation in a controlled and tightly encapsulated fashion.
They permit code to focus on the type and essential limited range of behaviors
needed for a particular reference, without sacrificing the power of any other
interfaces or parent classes that the run-time type may inherit.
As Joshua Bloch pointed out in /Effective Java/, one should "[p]refer
interfaces to abstract classes" (Item 18 in the second edition).
You should read that chapter.
You make interfaces sound like a red-headed stepchild when they're actually
one of the most singularly powerful features of Java.