I have a question about the javaranch scwcd mock exam as you can see below. I think i have seen it before but now i cannot find it. What is the answer and why ?
i think it does not compile, but javaranch explains An error page is returned from the Server.
public class PostServlet extends HttpServlet
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
PrintWriter out = response.getWriter();
out.println(" <h2>\n Hello World\n </h2>\n");
What is the result of compiling the above Servlet and accessing it by typing:
into the address field of a browser