Java.io.PrintStream.append() 方法


Java.io.PrintStream.append() 方法

package com.codingdict;



import java.io.*;



public class PrintStreamDemo {



   public static void main(String[] args) {

      char c = 'A';



      // create printstream object

      PrintStream ps = new PrintStream(System.out);



      // append our characters

      ps.append(c);

      ps.append('y');

      ps.append('m');



      // print the result

      ps.flush();

      ps.close();

   }

}