List of usage examples for java.io PrintWriter append
public PrintWriter append(CharSequence csq, int start, int end)
From source file:Main.java
public static void main(String[] args) { CharSequence sq1 = "Hello"; CharSequence sq2 = " World"; PrintWriter pw = new PrintWriter(System.out); // append the sequence pw.append(sq1, 1, 3); pw.append(sq2, 1, 4);//from w ww. j ava2 s . co m // flush the writer pw.flush(); }