📅  最后修改于: 2022-03-11 14:52:35.849000             🧑  作者: Mango
import java.io.FileWriter;
...
FileWriter writer = new FileWriter("output.txt");
for(String str: arr) {
writer.write(str + System.lineSeparator());
}
writer.close();