Java UUID Create generateUUIDRandom()

Here you can find the source of generateUUIDRandom()

Description

generate UUID Random

License

Apache License

Declaration

public static String generateUUIDRandom() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Random;
import java.util.UUID;

public class Main {
    public static String generateUUIDRandom() {
        String uuid = UUID.randomUUID().toString();

        uuid += "-" + generateShortRandom();

        return uuid;
    }// www. ja va  2 s.com

    public static int generateShortRandom() {
        Random randomGenerator = new Random();

        return randomGenerator.nextInt(99000 - 10000 + 1) + 10000;
    }
}

Related

  1. generateUuid(String seed)
  2. generateUUIDFileName(String fileName)
  3. generateUUIDFrom(String uuidString)
  4. generateUUIDFromString(String uuid)
  5. generateUUIDName(String filename)
  6. generateUuidStringStatic()
  7. generatorToken()
  8. generatorTransactionPath(String namespace)
  9. genMonUUID(String prefix)