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!

Precision in Java

807603Dec 2 2004 — edited Jan 24 2008
I have a question for a precision in java.
i am using

double num=.349995953;

now the thing is that i want to round of variable "num" to two decimal places. so that the value of num become .35

I am not falimiar with how to set this precision, I wonder if any one can help me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2008
Added on Dec 2 2004
11 comments
376 views