📜  java代码示例中如何处理filenotfoundexception

📅  最后修改于: 2022-03-11 14:52:44.740000             🧑  作者: Mango

代码示例1
It will throw a FileNotFoundException if the file doesn't 
exist and cannot be created (doc), but it will create it if it can. 
To be sure you probably should first test that the file exists before 
you create the FileOutputStream (and create with createNewFile() if 
it doesn't)