⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 writeunbufferedtest.java

📁 Java课堂练习
💻 JAVA
字号:
/**
 * @(#)WriteUnbufferedTest.java
 *
 *
 * @author 
 * @version 1.00 2007/11/15
 */
import java.io.*;

public class WriteUnbufferedTest {
        
    /**
     * Creates a new instance of <code>WriteUnbufferedTest</code>.
     */
    public WriteUnbufferedTest() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try {
        long start=System.currentTimeMillis();
        FileOutputStream  fs_out=new FileOutputStream("4.txt");
        DataOutputStream  out=new DataOutputStream(fs_out);
        for (int i=0; i<100000; i++)
          out.writeDouble(Math.random());
        out.close();
        long stop=System.currentTimeMillis();
        System.out.println("Time passed:"+(stop-start));
        }
        catch(IOException ioe) {
        System.out.println(ioe);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -