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


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

package com.codingdict;



import java.io.*;



public class PrintWriterDemo {



   public static void main(String[] args) {

      int i = 123;



      // create a new writer

      PrintWriter pw = new PrintWriter(System.out);



      // print int

      pw.println(i);

      pw.println(987);



      // flush the writer

      pw.flush();

   }

}