import java.io.FileNotFoundException;标签:java,filestream,处理,IOException,fileOutputStream,io,import,异常,FileOutputStream From: https://www.cnblogs.com/zhaoshengfu/p/18086204
import java.io.FileOutputStream;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
FileOutputStream fileOutputStream = null;
try {
fileOutputStream = new FileOutputStream("C:\\Users\\31339\\Desktop\\新建文件夹 (7)\\fileoutstreamtwoquestions\\111.txt", true);
fileOutputStream.write("111".getBytes());
} catch (IOException e) {
e.printStackTrace();
} finally {
if (fileOutputStream != null) {
try {
fileOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}