Servlet interface contains three methods known as life-cycle methods.
Init , service and destroy.
First the servlet is constructed, then initialized with the init() method. Any request from client are handled initially by the service() method before delegating to the doXxx() methods in the case of HttpServlet. The servlet is removed from service, destroyed with the destroy() method, then garbaged collected and finalized.