I have problem , I only get program to write the frist line but how to write the whole string?
When I print that string I get correct ouput? It has 10 lines
String fileName = "System.err";
File newFile = new File(fileName);
try {
if (newFile.exists()) {
FileWriter fos = new FileWriter(newFile);
fos.write(strLine);
fos.close();
System.out.flush();
}
}
catch( IOException ioe ) {
ioe.printStackTrace();
}