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!

Check if double is an Integer

807606Feb 21 2007 — edited Feb 21 2007
Hi,

How can I check if a double is an integer?

Also, if the double is not an integer I'd like to retrive the decimal value rounded to
one number...Like this: My double = 2.17 - Id like to retrieve .17 rounded to .2!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2007
Added on Feb 21 2007
4 comments
541 views