import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class wjzjl {
public static void main(String[] args) {
File f=new File(“word.txt”); //创建文件对象
try {
FileOutputStream fo=new FileOutputStream(f);//创建文件输出流,把fo中的内容写道文件中
byte byt[]=“姓名:齐燕博 学号:20202204061”.getBytes();//创建一个byte数组,利用getbytes函数将字符串转化为字符
fo.write(byt); //把byt的内容写道文件中
fo.close(); //关闭流
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
package KOBE;
import java.io.BufferedWriter;
import j