Last active
August 29, 2015 14:19
-
-
Save eoftedal/50a3ddd6bcc060ff2bd2 to your computer and use it in GitHub Desktop.
Crazy stuff
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
import java.security.SecureRandom; | |
import java.math.BigInteger; | |
public class Lottery { | |
private static SecureRandom random = new SecureRandom(); | |
public static void main(String[] args) { | |
String lotteryNumber = new BigInteger(130, random).toString(32); | |
/* Used when testing \u002a\u002f | |
lotteryNumber = "123"; | |
\u002f\u002a */ | |
System.out.println("The winning number is: " + lotteryNumber); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment