Languages
[Edit]
EN

Java - generate array with 10 random numbers

9 points
Created by:
Frank-van-Puffelen
439

Generate array with 10 random numbers in range 60 and 100.

Edit

We can change min and max value to any Integer value, also negative.


We can adjust the above code to generate array with 10 random longs, floats or doubles.
To get the code for random min max long, float, double check post:
https://dirask.com/q/zjM2x1

and hashtag #random-min-max with methods for int, long, float, double to generate numbers in range min and max
https://dirask.com/hashtags/random-min-max

There are other ways to generate random integer in range min-max, look at this post:
https://dirask.com/q/VjoP81

References

Edit

ThreadLocalRandom - Java docs
Random - Java docs

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - generate array with 10 random numbers

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join