+ 7
What is the code inside Random class?
Just curious about how the random class works in java.
5 ответов
+ 7
source code:
http://developer.classpath.org/doc/java/util/Random-source.html
notice that the first thing that happens if you call the default constructor:
Random rnd = new Random();
the setSeed() method is called with the current system time as parameter
next interesting thing to look at is
protected synchronized int next(int bits){...}
method which seems as the workhorse of this class
+ 4
well this question arises in my mind as well
+ 4
nice.... 😬😬😬
+ 1
well not true
+ 1
then what is the reality Ciara