N
N
nikesport2014-11-28 14:12:05
Java
nikesport, 2014-11-28 14:12:05

How to take random from a span?

How to take random from a range in Java? For example from 10000-90000?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
_
_ _, 2014-11-28
@AMar4enko

Normally rand will return numbers between 0 and 1.
If so, then 10000 + rand()*80000

A
Anton Fedoryan, 2014-11-28
@AnnTHony

random java function
normal search no longer helps?

N
Nikolai Pavlov, 2014-12-01
@gurinderu

Try commons.apache.org/proper/commons-math/apidocs/org...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question