📄 filesave.java
字号:
/*
* FileSave.java
*
* Created on 2008年4月5日, 下午8:18
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package finaltest;
import java.io.*;
/**
*
* @author Administrator
*/
public class FileSave {
static FileSave filesave;
/** Creates a new instance of FileSave */
public FileSave() throws IOException {
StudentNode temp =StudentNode.head;
BufferedWriter bufout =new BufferedWriter(new FileWriter("fei.txt"));
for(int i=0;i<StudentNode.itemnow&&temp!=null;i++){
bufout.write(temp.student.getId()+"#");
bufout.write(temp.student.getName()+"#");
bufout.write(String.valueOf(temp.student.getAge()+"#"));
bufout.write(temp.student.getSex()+"#");
bufout.write(temp.student.getMajor()+"#");
bufout.write(temp.student.getMyclass()+"#");
bufout.write("\r\n");
temp =temp.next;
}
bufout.close();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -