| 发表于:2007-03-08 18:56:35 楼主 |
import java.io.*; class test12 { public static void main(string args[]){ file f1=new file( "yqh.txt "); file f2=new file( "2009.txt "); fileoutputstream fout=null; filewriter fw=null; printstream ps=null; printwriter pw=null; try{ fout=new fileoutputstream(f1); fw=new filewriter(f2); ps=new printstream(fout); pw=new printwriter(fw); ps.write( "fghfghf ".getbytes()); pw.write( "asasdsdfdsffsdf "); // pw.flush(); }catch(exception e){} } } 为什么ps明明没有刷新的啊,2009那个文件就有数据,而yqh那个文件里没有数据。 |
|
|
|
|