What is the exact difference between out.write() and out.print()

后端 未结 9 610
情深已故
情深已故 2020-12-13 20:49

In my servlet I gave both out.print and out.write. but both prints in the browser.

What is the exact difference between these two and when

9条回答
  •  自闭症患者
    2020-12-13 21:26

    I simply know it as like this:

    out.println() is method of javax.​servlet.​jsp.​JspWriter

    out.write() is method of java.io.Writer

提交回复
热议问题