Java.io.PrintStream.print char() 方法


Java.io.PrintStream.print char() 方法

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);



      // print char

      ps.print(c);

      ps.print('b');



      // flush the stream

      ps.flush();

   }

}