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!

Round up to the nearest 1000. Need help urgently

807606Feb 12 2007 — edited Feb 12 2007
Hi,
I am trying to find out a way to round up a long or integer value to the nearest 1000.
For example:

32200 > 33000
41100 > 42000
52300 > 53000

21000 > 21000 (no need to round up)

Does anyone have any idea how to do this?
Appreciate if anyone can give me some advice how to do this. Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2007
Added on Feb 12 2007
6 comments
428 views