As the question suggests, I'm using String.format("%.5e",someDouble)
because I want the following format #.#####E+#
.
I'm making a calculator for a tutorial. Let's say I'm typing in 333,333,333,333 * 333,333,333,333. The answer in the correct format should be "1.11111E+23
". But instead it's giving me "1.1111111111089
" no matter what number I put before the 'e' in the format argument of the String.format(String format, Object... args)
method.