What is the difference between append and write methods of java.io.writer?

前端 未结 6 809
情话喂你
情话喂你 2020-12-15 03:29

The java.io.Writer interface has two methods called append and write. What are the differences between these two? It even says that

An invocation of t

6条回答
  •  半阙折子戏
    2020-12-15 04:15

    Looks to me like it's a byproduct of the Appendable interface which java.io.Writer implements in order to provide compatibility with java.util.Formatter. As you noted, the documentation points out that for java.io.Writer there is no practical difference between the two methods.

提交回复
热议问题