Java tutorial
import java.io.*; public class Main { public static void main(String[] args) { String s = "tutorial from java2s.com "; PrintWriter pw = new PrintWriter(System.out); // append the sequence pw.append(s); // check if there is an error and flush System.out.println("" + pw.checkError()); } }