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


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

package com.codingdict;



import java.io.*;



public class PrintStreamDemo {



   public static void main(String[] args) {

      double x = 12345678;



      // create printstream object

      PrintStream ps = new PrintStream(System.out);



      // print double

      ps.print(x);



      // flush the stream

      ps.flush();

   }

}