Java.io.PrintWriter.write int() 方法


Java.io.PrintWriter.write int() 方法

package com.codingdict;



import java.io.*;



public class PrintWriterDemo {



   public static void main(String[] args) {

      int i = 70;



      // create a new writer

      PrintWriter pw = new PrintWriter(System.out);



      // write integer as ASCII characters

      pw.write(i);

      pw.write(76);



      // flush the writer

      pw.flush();

   }

}