Java.io.PrintStream.print int() 方法


Java.io.PrintStream.print int() 方法

package com.codingdict;



import java.io.*;



public class PrintStreamDemo {



   public static void main(String[] args) {

      int x = 5;



      // create printstream object

      PrintStream ps = new PrintStream(System.out);



      // print integer

      ps.print(x);

      ps.print(100);



      // flush the stream

      ps.flush();

   }

}