以下实例演示了使用 BufferedWriter 类的 read 和 write 方法将文件内容复制到另一个文件:
Main.java 文件
以上代码运行输出结果为:
string to be copied