Answer:
If we don’t know anything about implementation just we have requirement specification (100% Abstraction) then we should go for Interface.
Example: Servlet
If we don’t know anything about implementation just we have requirement specification (100% Abstraction) then we should go for Interface.
If we talking about implementation but not completely (partial implementation) then we go for Abstract class.
Example: GenericServlet and HTTPServlet.
Example: MyOwnServlet.