response.getWriter().write()与response.getWriter().print()
经实测,以上两种方法都是输出,没感觉到有什么差异;
API文档中介绍write()方法比较简单
介绍print()方法说:
public void print(String s)
Prints a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.