标签:io os java for 文件 on new res file
@Test
//将内容写入文件
public void xieru() throws Exception{
FileWriter fileWriter=new FileWriter("d:\\Result.txt");
int [] a=new int[]{111,222,333,444,555,666};
for (int i = 0; i < a.length; i++) {
fileWriter.write(String.valueOf(a[i])+"\n");//换行转意
}
fileWriter.flush();
fileWriter.close();
}
标签:io os java for 文件 on new res file
原文地址:http://www.cnblogs.com/yy123/p/4080846.html