So say for instance i have the following code:
DecimalFormat df = new DecimalFormat();
df.setMaximumFractionDigits(2);
df.setMinimumFractionDigits(2);
df.format(125,436573);
Now this returns a string.
Since you cannot convert String
into a double
(using cast) how would i get a type double
?
Also as far as i oculd understand this only removes everything after the two digits instead of actually rounding up.
I have been looking around the Java.lang.math
objects but couldnt seem to find the solution
For the record i need it to insert the double it into my database table.