I am trying to generate UUID's and have found some useful info. I am able to generate them now, but now what I want to do is create like my own function, where by if I type in lets say something like the word create, then it will generate the random UUID. I am using the standard code I found online and appreciate any advise. Thank you. This is what I have so far :
static UUID uuid;
public static void main(String[] args) {
int i = 0;
while(i < 10) {
uuid = UUID.randomUUID();
System.out.println("Random UUID value: "+uuid);
System.out.println("Random UUID value: "+uuid.version());
i++;
}
uuid = UUID.fromString("60288f72-9778-11e6-ae22-56b6b6499611");
System.out.println("String UUID value: "+uuid);
System.out.println("String UUID version: "+uuid.version());
// I want it to be if I type in the word create, then this method will be called and generate the random UUID....
Aucun commentaire:
Enregistrer un commentaire