Computer Science, asked by Babupatel2162, 1 year ago

What is difference in append and write mode?

Answers

Answered by Raghav3333
2
there  are minor differences between append() and write(). All of which you can work out by reading the Javadocs. Hint. ;)write will only take a String which must not be null and returns voidappend will take any CharSequence which can be null and return the Writer so it can be chained.

write is an older style format created before CharSequence was available.

These methods are overloaded so that there is a

write(int) where the int is cast to a char. append(char) must be a char type.write(char[] chars) takes an array of char, there is no equivalent append().
Similar questions