public class IO01 {
public static void main(String[] args) throws IOException {
FileOutputStream fos = new FileOutputStream("code\\fos.txt");//在后端隐式执行File文件的操作
FileOutputStream fos2 = new FileOutputStream(new File("code\\fos.txt"));//已显式执行File文件操作,所以与上者功能一样
byte[] bys="fadbvcx".getBytes();//将字符串转化为字符数组
fos.write(bys);
}
}
09-04
4449
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-22
3万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-18
3195
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-17
6万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)