Can somebody explain me why javax.servlet.Servlet is an interface NOT an abstract class?
Servlet defines set of methods that can be invoked by the container. So defining the required functionalities upfront is a good approach. and if you notice, there is an abstract class called GenericServlet that implements Servlet Interface which in turn all other Servlets have been extended.
Is there any specific reason you think it should have been an abstract class rather than Servlet? As far as I understand, it is how they designed the framework. They wanted to define the functionalities first and then come up with implementation at a later point. So interface first and then implementation.
Thanks & Regards, Ravi C.Kota
SCJP 5.0, OCDJWS 5.0
Which is quite a common approach - have an interface that defines the behaviour (for maximum flexibility), then have an abstract class implementing that interface to provide common behaviour. See java.util.List and java.util.AbstractList for another example.