Whilst interfaces can be used to simulate multiple inheritance (in the C++ sense) that's a mis-use and a bit of a red herring. Interfaces are not there to give you multiple inheritance in Java: if you're doing that then either there's something wrong with your design, the design of some class library or the way you're trying to use it.
To answer the
thread starter's question: why use an abstract class instead of an interface (and vice versa)?
I would *always* use an interface, as that defines the set of operations supported by my classes. I might then consider implementing that interface as an abstract class in order to provide some skeleton code or some default behaviour.
Why would I use both?
Because by implementing the top level as an interface I allow for the possibility of anything being overridden: I don't impose any unnecessary restrictions on how the interface is implemented in the future.
I'd use the Abstract class to implement any common implementation: and I'd make it abstract even if I implemented every method defined in the interface because (without going into the reasoning) only the leaf classes of an inheritance hierarchy should be concrete. I wouldn't necessarily have an abstract class at all.
Hope that helps.
Edward
[ January 07, 2005: Message edited by: Edward Kenworthy ]