Good day!
Kindly please someone tells me why my program generates same content of output file? They're supposed to have different contents.
Must be something wrong about my codes..help me to figure it out, Thank you very much...
Kindly please someone tells me why my program generates same content of output file? They're supposed to have different contents.
Must be something wrong about my codes..help me to figure it out, Thank you very much...
Code:
for(int i=0; i < 5; i++) { try { output = new BufferedWriter( new FileWriter(FILENAME + ind + ".txt", true)); output.write(name+ " " + add+ " " + phone + "\n"); output.close(); }catch (IOException e) { System.out.println("There was a problem creating/writing to the temp file"); e.printStackTrace(); } }
Comment