I want to serialize/deserialize doubles to a readable String. I’m happy to lose any accuracy beyond the 6th dp.
Whats the correct approach for doing this?
I’m concerned about System.out.println(1.03 – .42) printing 0.6100000000000001 and not 0.61.
Thxs.
The simplest approach is to use PrintWriter and BufferedReader.
prints