I have two projects in the eclipse workspace that perform similar tasks. Both projects have a special part in which I convert doubleto String.
I have both projects, I did this by calling String.valueOf(var).
In an older project, I always get the number in the format “-0.00097656” that I need. In the new version, I get the tenth exponential format, for example, "-9.765625E-4". I also have the fact that the old project reduces the length of the string.
My question is: what commands can lead to such behavior that java changes the default output. I have already searched for the code, but I do not see what does this. Or could it be an eclipse variant?
I want the new project to be consistent with the older one, and I don't want to use these string format calls every time in the new project. Anywhere in the old project should be setting up or some challenges ...
Hope someone can give a hint.
source
share