StringWriter vs StringBuilder given in simple terms for Beginner.
StringWriter from java.io package is a stream class capable to write strings to a file.
StringBuilder is a replacement to StringBuffer where data under operation is not critical. StringBuffer methods are synchronized where as StringBuilder methods not synchronized. All the methods of StringBuffer exist in StringBuilder. Using StringBuilder, a string can be manipulated like deleting or replacing a few characters etc.