I wrote a simple servlet as follows:
public class MyServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
// [do stuff with the PrintWriter]
out.close();
}
}
Is it necessary to close the PrintWriter
out stream? If I don't close the stream will that affect anything further?