HttpServletResponse response;
PrintWriter out = response.getWriter();
out.print("Hello");
out.println("HelloWorld");
My question seem silly, but In Servlet, I see that both print() and println() do same thing !!!
If you want to go to another line, you must put <br> tag at the end of String.
Thanks 🙂
printlnappends a new line (\n) after the printed text. New lines are not interpreted within HTML, therefore you won’t see a difference between the output ofprintlnandprintwithin the rendered HTML.