An "interface" is like a contract: it dictates what behavior needs to be defined, but doesn't provide any implementation. There are no instance variables or methods, but only method signatures (method name, parameter list, return type). An "abstract class" is a class that can't be instantiated, but it can contain instance variables and methods. It assumes that there will be "concrete" classes [non-abstract] that extend the abstract class. Abstract classes can be used as parent classes when there is a lot of common function/behavior in the child classes that you want to define in a single place. Interfaces are used when you need to define what methods are to be supported, but there is no common functionality because every class that implements the interface will do it in very different ways. Good examples of interfaces are found in the "java.sql" package. Sun defines the behavior of a Connection (i.e., "close()", "createStatement()", etc.), but they have no way of know how that behavior is to be implemented for each database. Those details are left up to the driver providers. The other difference lies in the fact that Java defines a single-inheritance model, meaning a child class can extend only one parent class. However it can implement as many interfaces as it needs to, so you get some of the benefits of multiple inheritance w/out many of the issues. Interfaces also allow you to easily plug in different classes at run-time, as long as they all implement the target interface. I'm sure others can explain it better, but if you search the web I'm sure you find many other explanations as well. (Here's a quick one: The Java Boutique). [ September 17, 2003: Message edited by: Wayne L Johnson ]
This is a *very* frequently asked question - doing a search should give you many past discussions on exactly this topic.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus