Abstract classes are essentially skeleton classes that you can extend and complete with sub-classes.
An example of an abstract class, which allows for some easier management down the line:
public abstract class CommandBase {
public abstract String getName();
public String getUsage() {
return "/" + this.getName();
}
}
You can then extend the class like so:
public class SomeCommand extends CommandBase {
@Override //This is a required override
public String getName() {
return "some";
}
@Override //This is an optional override, method was not abstract
public String getUsage() {
return super.getUsage() + " <text>"; //refer to superclass for original method invocation
//Would return '/some <text>'
}
Interfaces are a "contract" specifying that classes which implement them will have that method.
You can implement multiple interfaces, but only extend one class. Abstract classes and interfaces cannot be directly instantiated.
Try reading up a bit on Java's documentation around them.