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


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

package com.codingdict;



import java.io.*;



public class PrintStreamDemo {



   public static void main(String[] args) {

      char[] s = {'a', 'b', 'c'};

      char[] c = {'H', 'e', 'l', 'l', 'o'};



      // create printstream object

      PrintStream ps = new PrintStream(System.out);



      // print char array

      ps.print(s);

      ps.print(c);



      // flush the stream

      ps.flush();

   }

}