Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert a string to double with precision

807605Jul 5 2007 — edited Jul 5 2007
I am getting a value amount of say $45.00 from a jsp and set this value as a string for my other work. then i am changing this string to double by using this statement
setAmount(Double.parseDouble(cstmt.getString(1)));
my precision is lost when i get this amount it just shows 45.0 how can I get the precision of 45.00
I would appreciate if any assistance is provided for the problem.
thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2007
Added on Jul 5 2007
6 comments
715 views