我有以下代码:
private void writeToFile(String filename,ArrayList<String>arr)throws FileNotFoundException{
try{
FileWriter writer= new FileWriter(filename);
String str="";
for(String string:arr){
str+=string;
}
}
catch(IOException e){
e.printStackTrace();
}
}
我的问题是我不断收到fileNotFoundException
错误。
这是android studio的正确方法吗?