3 ms·
https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html https://docs.oracle.com/javase/7/docs/api/java/lang/Math.htm... Random also exists, with a bunch
by hinkley 4y ago
https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html https://docs.oracle.com/javase/7/docs/api/java/lang/Math.htm...
Random also exists, with a bunch of options including CSPRNG. But if you’re just simulating a die roll, Math.random is sufficient unless you’re writing gambling software.