发布网友 发布时间:2022-04-24 14:27
共1个回答
热心网友 时间:2023-10-16 08:53
import java.io.*;
public class A
{
public static void main(String[] args)throws IOException
{
BufferedReader reader=new BufferedReader(new FileReader("e:/test/c.txt"));
BufferedWriter writer=new BufferedWriter(new FileWriter("e:/test/b.txt"));
String s;
while((s=reader.readLine())!=null) //读a的内容
{
System.out.println(s); //显示读到的a内容
writer.write(s.toUpperCase()); //将a的内容转换为大写,写到b里面
writer.write("\r\n");
}
reader.close();
writer.close();
}
}