The service method & other servlet lifecycle methods come from the javax.servlet.Servlet interface. The javax.servlet.GenericServlet is the abstract class that implements Servlet interface. To write a generic servlet you only need to override the abstract service() method. However mostly we use javax.servlet.http.HttpServlet. Here you never override service() method. The default implementation of service() provided by this abstract class handles HTTP requests by dispatching them to the handler methods(doXXX() methods) for each HTTP request type. e.g.doGet() for a GET request.
subject: in which interface or class the method service(request, response) is present?