This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all, I was browsing the Servlet API and i came across the Servlet interface. There are many functions under the Servlet interface.Some of which are as follows
java.lang.String getServletInfo() void init(ServletConfig config) void service(ServletRequest req, ServletResponse res) Each of these functions have different purposes,Some even return values.
An interface has no method implementations in it. My Question is: How can an Interface like Servlet have methods that return value without any implementations in them?Please do reply. Thank you in advane
Servlet is very generic and abstract. Servlet as a concept is not protocol specific. If you see some implementation for example implementation for HHTP protocol it comes with some implementaion as how to handle that. You can write some implementation that can handle FTP etc that will have the implementation.
The rest will be given by the user who is extending them(..business).