An Abstract class, is essentially a class which can contain abstract methods, and concrete methods. Any class exending an abstract class MUST implement those abstract methods, unless the extending class is also abstract, in which case it does not have to implement the methods.
The rule of thumb in the inheritance chain the first concrete (non abstract class) to extend an abstract class MUST implement those abstract methods.
Abstract classes cannot be instantiated with the new keyword, they must be extended (inherited)
E.g (probably plagarism, apologies!)
In an interfacte, you are essentially creating a "contract" in your application, specifying that any class unless abstract must implement the methods decalred (but not implemebted) in the interface.
Interfaces cannot have non abstract methods, and all variables are static and must be initialized in the interface
So from the example before we can change to an interface:
Interfaces overcome the
java restriction of single parent classes, as a class may implement any number of interaces, and interfaces may EXTEND any number of other interfaces.
Hope this helps!
[ September 17, 2008: Message edited by: Stephen Davies ]