Is it a good design to have Skeletal Classes / Abstract classes without putting into practice any method?


I am designing an interface, for which I plan to to have an abstract class or skeletal class as per Effective Java(Joshua Bloch) Item 18: Prefer interfaces to abstract classes.
The reason is to guard future evolution of the interface from breaking the implementing classes.

As of today, I do not have any methods for which I want to provide a default implementation. Is this design okay?


public interface Foo{
  public List<Baz> getBazList();
  public String getId();
  public String getName();

public abstract class AbstractFoo implements Foo{

There is a simple but powerful test you can apply in this and similar cases.

Ask yourself this question: "How would I use this abstract class in my code? What do I plan to do with it that I can't with my interface?"

If the answer is "nothing", then get rid of it. If a construct serves no real purpose, it just adds clutter to your code.