Created
May 7, 2013 00:21
-
-
Save azenla/5529386 to your computer and use it in GitHub Desktop.
GCP ID Helper
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 kaendfinger.gcpd; | |
import java.util.Random; | |
public class GCPDIDHelper { | |
public static void main(String[] args) { | |
System.out.println(createID()); | |
} | |
public static String createID() { | |
Random random = new Random(); | |
Integer a = random.nextInt(9); | |
Integer b = random.nextInt(9); | |
Integer c = random.nextInt(9); | |
Integer d = random.nextInt(9); | |
Integer e = random.nextInt(9); | |
Integer f = random.nextInt(9); | |
Integer g = random.nextInt(9); | |
Integer h = random.nextInt(9); | |
Integer i = random.nextInt(9); | |
Integer j = random.nextInt(9); | |
Integer k = random.nextInt(9); | |
Integer l = random.nextInt(9); | |
Integer m = random.nextInt(9); | |
Integer n = random.nextInt(9); | |
Integer o = random.nextInt(9); | |
return "" | |
+ a.toString() | |
+ b.toString() | |
+ c.toString() | |
+ "-" | |
+ d.toString() | |
+ e.toString() | |
+ f.toString() | |
+ "-" | |
+ g.toString() | |
+ h.toString() | |
+ i.toString() | |
+ "-" | |
+ j.toString() | |
+ k.toString() | |
+ l.toString() | |
+ "-" | |
+ m.toString() | |
+ n.toString() | |
+ o.toString() | |
; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment