Please consider the following code snippet:
import java.io.*;
import java.util.*;
import javax.servlet.*;
public class PostParametersServlet extends GenericServlet{
public void service(ServletRequest request , ServletResponse response) throws
ServletException, IOException { ....
and so on and so forth.....
My Question:
It's been said that we cannot create an object of an interface but if we consider the above code snippet, ServletRequest and ServletResponse are the core interfaces of javax.servlet package.
Also, "request" and "response" are said to be objects in the above program description.
Could anyone tell/explain me how can these interfaces have object of their own considering the fact that interfaces cannot have objects?
Please correct me if I'm wrong somewhere.