int c;
FileInputStream fin1=new FileInputStream(new File("hello1.txt"));
FileOutputStream fout1=new FileOutputStream(new File("hello.txt"));
while((c=fin1.read())!=-1)
{
//System.out.println(c);这一句跟下面那句居然打印出不同的结果
//System.out.println(fin1.read());//好奇怪啊
fout1.write(c);
}
为什么两句打印语句的结果不同啊?
FileInputStream fin1=new FileInputStream(new File("hello1.txt"));
FileOutputStream fout1=new FileOutputStream(new File("hello.txt"));
while((c=fin1.read())!=-1)
{
//System.out.println(c);这一句跟下面那句居然打印出不同的结果
//System.out.println(fin1.read());//好奇怪啊
fout1.write(c);
}
为什么两句打印语句的结果不同啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货