Java tutorial
import java.io.*; public class Main { public static void main(String[] args) { StringWriter sw = new StringWriter(); // append a char System.out.println(sw.append("a")); System.out.println(sw.append("b")); System.out.println(sw.toString()); } }