Is it just because of "large API syndrome" or generating random numbers that are more biased favored in some situations? If it was..I would think that controlling the bias-ness would be important.
They're the same, really. Just a convenience method. Check the javadoc here . Additionally, you're able to re-seed by creating random objects, while Math.random()
will use a static Random instance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.