Java.io.PrintWriter.write Char len() 方法


Java.io.PrintWriter.write Char len() 方法

package com.codingdict;



import java.io.*;



public class PrintWriterDemo {



   public static void main(String[] args) {

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



      // create a new writer

      PrintWriter pw = new PrintWriter(System.out);



      // write char

      pw.write(c, 1, 3);

      pw.write(c, 3, 3);



      // flush the writer

      pw.flush();

   }

}