find number range in java

Posted by Gandalf StormCrow on Stack Overflow See other posts from Stack Overflow or by Gandalf StormCrow
Published on 2010-04-23T14:57:38Z Indexed on 2010/04/23 15:03 UTC
Read the original article Hit count: 163

Filed under:

How to get number range in java? for instance how can verify is the number 2389 within 10 numbers from 2400. its not but 2389 is.

Ok here is the rephrase :

Number 1000 is the range number 990 is comming in the loop, I return true because the between 990 and 1000 is 10 numbers diference.

In comes the next number 989 range is always 1000, I return false because the between 989 and 1000 is 11 numbers diference.

In comes the next number 1013 range is always 1000, I return false because the between 1013 and 1000 is 13 numbers diference.

© Stack Overflow or respective owner

Related posts about java