Java.io.PrintWriter.println char Array() 方法


Java.io.PrintWriter.println char Array() 方法

package com.codingdict;



import java.io.*;



public class PrintWriterDemo {



   public static void main(String[] args) {

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

      char[] c2 = {'f', 'g', 'h', 'i', 'j'};



      // create a new writer

      PrintWriter pw = new PrintWriter(System.out);



      // print char array

      pw.println(c1);

      pw.println(c2);



      // flush the writer

      pw.flush();

   }

}