例如:FileWriter fw = new FileWriter(“mytest.txt”);BufferedWriter bw = new BufferWriter(fw);为什么要两个一起new,new一个BufferedWriter对象不行吗?
1 回答
四无小青年
TA贡献88条经验 获得超43个赞
/** * Creates a buffered character-output stream that uses a default-sized * output buffer. * * @param out A Writer * BufferedWriter的构造方法需要一个Writer对象作为参数 */ public BufferedWriter(Writer out) { this(out, defaultCharBufferSize); }
望采纳
添加回答
举报
0/150
提交
取消