Java.io.PrintStream.append Subsequence() 方法


Java.io.PrintStream.append Subsequence() 方法

package com.codingdict;



import java.io.*;



public class PrintStreamDemo {



   public static void main(String[] args) {

      CharSequence csq = "Hello World";



      // create printstream object

      PrintStream ps = new PrintStream(System.out);



      // append our character sequences

      ps.append(csq, 6, 11);

      ps.append(csq, 0, 5);



      // print the result

      ps.flush();

      ps.close();

   }

}