All the methods of Servlet and ServletConfig are implemented in GenericServlet.
Only abstract method in GenericServlet is the service(ServletRequest, ServletResponse) method. The implementation of this method is left to the class which extends GenericServlet. HttpServlet happens to be one of such classes, which provides HTTP specific implementation.
Similarly we can choose to have another FTPServlet which provides FTP specific service() method implementation.
In otherwords, GenericServlet is abstract because it gives a generic signature for the service() method, leaving the implementation details to the subclass.
if we don't write service method in userservelt(programmer) & write only doGet or doPost then how it will work.
If you're dealing with HTTP servlets, then you usually extend your servlet from HttpServlet, which deals with the service() method. If you extend from GenericServlet, you must implement the abstract service method, otherwise it won't compile.
What is FTPServlet
It is just an example, given by Ashwin, of another kind of class which could extend the GenericServlet. (it does not exist)
Posted by vilas if we don't write service method in userservelt(programmer) & write only doGet or doPost then how it will work.
The HttpServlet has overridden the service method which checks for the incoming request and invokes one of the method doGet,doPost.. depending on the type of request. There is nothing stopping you from overriding the service method of HttpServlet but why do you need to do it when you have the do<Method> available?