Here you can find the source of saveIntegerNodes2File(Integer[] nodes, String fileName)
public static void saveIntegerNodes2File(Integer[] nodes, String fileName) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { /**//from ww w . j a v a2 s. com * save Integer nodes to the fileName */ public static void saveIntegerNodes2File(Integer[] nodes, String fileName) throws IOException { FileWriter fw = null; fw = new FileWriter(fileName); String str = ""; if (nodes != null) { for (int i = 0; i < nodes.length; i++) { str = str + nodes[i]; str = str + "\n"; } } else { str = "null"; } fw.write(str); fw.close(); } }