JAVA IO - How to write data (double, float) to a text file
843811Dec 30 2001 — edited Dec 31 2001I am writing an application that after it runs it writes some results to a log file. It needs to write values of data type double and float to this log file. The log file needs to be in a human-readable text form not in an internal binary format. How do I do this?
I tried connecting an OutputStreamWriter with a FileWriter, but it sure didn't work.
osw = new OutputStreamWriter(new FileWriter("test2.txt"));
Any help would be appreciated.
Thanks
Alex