Created
September 18, 2014 11:32
-
-
Save AndreasHassing/1d21e591334ac29e6851 to your computer and use it in GitHub Desktop.
BetterRandom (better random numbers than java.util.Random;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dk.itu.abhn.betterrandom; | |
/** | |
* BetterRandom is a better alternative to Javas' | |
* java.util.Random, as it generates a completely | |
* random number (that I picked). | |
* @author abhn@itu.dk | |
*/ | |
public class BetterRandom { | |
/** | |
* Constructor .. Could take a seed to adjust the random number | |
* but that would be a waste of computation power. | |
* Rather use that delicious computation power on lolcats and 9gag. | |
*/ | |
public BetterRandom() {} | |
/** | |
* 42 is a completely random number that I picked. | |
* BetterRandom returns this completely random number. | |
* GG NO RE | |
* @return 42, a random number that I just picked. | |
*/ | |
public int nextInt() { | |
return 42; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment