Java.io.PrintWriter.print Char Array() 方法


Java.io.PrintWriter.print Char Array() 方法

package com.codingdict;



import java.io.*;



public class PrintWriterDemo {



   public static void main(String[] args) {

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



      // create a new writer

      PrintWriter pw = new PrintWriter(System.out);



      // print char array

      pw.print(c);



      // flush the writer

      pw.flush();

   }

}