Randomis predictable, you just need a small sequence of generated numbers, and you can go back and forth through the sequence. See Inverse function of a random Java function for an example of a sequence change.
SecureRandom no.
ThreadLocalRandom- an attempt to correct the fact that Randomit is not thread safe.
Other forms of randomness are possible with various functions - you will have to study the mathematics of random numbers in order to be able to balance between the ones you mentioned and any other algorithm.
SecureRandom getInstanceStrong()(note Strong ) seems to be an even stronger random sequence that is especially resistant to exhibiting long sequences.
Randomness
- , , , .
, . , , , . :
private static int lastRandom = 0;
public static int nextRandom() {
return ++lastRandom;
}
, , , .
, StackOverflow. , , . .
, , . , .
- . , , Wikipedia, , .