Example usage for java.io PrintStream append

List of usage examples for java.io PrintStream append

Introduction

In this page you can find the example usage for java.io PrintStream append.

Prototype

public PrintStream append(CharSequence csq, int start, int end) 

Source Link

Document

Appends a subsequence of the specified character sequence to this output stream.

Usage

From source file:Main.java

public static void main(String[] args) {
    CharSequence csq = "from java2s.com";

    PrintStream ps = new PrintStream(System.out);

    // append our character sequences
    ps.append(csq, 6, 11);
    ps.append(csq, 0, 5);/* www  .  j  a v a 2s . c om*/

    // print the result
    ps.flush();
    ps.close();

}