Why does JDK also have math Random () and random classes?

Is it just because of the "large API syndrome" or random numbers that are more biased in some cases? If it is... I think it is important to control the deviation

Solution

Really, they are the same It's just a convenient way Check Javadoc here In addition, you can reseed by creating random objects instead of math Random () will use a static random instance

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>