50,528
社区成员
发帖
与我相关
我的任务
分享
public static void showall()//显示操作
{
System.out.print("编号 姓名 年龄 性别\n");
BufferedReader br = null;
try {
br = new BufferedReader(new FileReader(new File("E:/stu.txt")));
String temp = br.readLine();
while (temp != null) {
System.out.print(temp);
temp = br.readLine();
}
br.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}