题目内容
下面的程序使用BufferedWriter类在D:\Hello.txt文件中写入10万个数并输出所用的时间,请将程序填写完整。importjava.io.*;publicclassEx4{publicstaticvoidmain(String[]args)throwsIOException{longt=System.currentTimeMillis();BufferedWriterfw=newBufferedWriter((1));//注意字符串中的转义符\\for(inti=1;i<=100000;i++){(2)(i+"\n");}fw.close();t=System.currentTimeMillis()-t;System.out.println("Timeelapsed:"+t+"ms");}}
查看答案
搜索结果不匹配?点我反馈