这是我在看基础视频时写的一段代码:import java.io.*;
public class FileReaderDemo2 {
public static void main(String []args)throws IOException
{ FileReader fr=new FileReader("Demo.txt");
char []buf=new char[3];
int num=fr.read(buf);
System.out.println("num="+num+"..."+new String(buf));
int num1=fr.read(buf);
System.out.println("num1="+num1+"..."+new String(buf));
int num2=fr.read(buf);
System.out.println("num2="+num2+"..."+new String(buf));
int num3=fr.read(buf);
System.out.println("num3="+num3+"..."+new String(buf));