import java.io.FileWriter;
import java.io.IOException;
public class FileWriterDemo {
public static void main(String[] args) throws IOException {
FileWriter fw = new FileWriter("a.txt");
String [] str={"sd","fs","sf"};
for(String s:str){
int len=s.length();
fw.write(s, 0, len);
}
}这段代码有什么错误?为什么不能写入文件中
|