lixiuliang 发表于 2014-2-9 18:25
楼主上一个帖子已经有人帮你纠正过这个错误了
FileInputStream fr=new FileInputStream("E:\\a.txt");
自由自在2014 发表于 2014-2-9 18:41
那要怎么用while判断来实现全部存储
lixiuliang 发表于 2014-2-9 18:45
int temp;
while((temp = fr.read()) != -1){
fw.write(temp);
自由自在2014 发表于 2014-2-9 18:53
那样出错了 改成下面的运行成功了
int temp=fr.read();
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |