• 2021-04-14
    在【1】-【5】处填上适当的代码,使程序能正常运行
    importjava.io.*;
    //将a.txt的内容复制到b.txt
    publicclassDemo{
    publicstaticvoidmain(String[]args)throwsIOException{
    【1】=newBufferedReader(newFileReader("a.txt"));
    BufferedWriterbw=newBufferedWriter(【2】);
    Strings1=null;
    【3】{
    while((s1=【4】.readLine())!=null){
    【5】.write(s1);
    System.out.print(s1);
    }
    }catch(IOExceptione){
    }finally{bw.close();br.close();}
    }
    }