here is a solution,
import java.io.*;
public class FileTest
{
public FileTest()
{
try{
File outputFile = new File("prova.txt");
FileWriter myout = new FileWriter(outputFile);
for(int i=0;i<100;i++)
{
myout.write("X:"+i);
myout.write("\n");
}
myout.flush();
}catch(Exception ex){ex.printStackTrace();}
}
public static void main(String args[])
{
new FileTest();
}
}
Please open the prova.txt file with wordpad. See you
have done it.