I have this string
17.12121
and I want to save it only as
17.12
I have try to use this command :
answer = String.format("%.2f", str1);
but he give an exception
java.util.IllegalFormatConversionException: f != java.lang.String
why ?
in the end I wnat the answer to be x.xx
Thanks ,