Java UUID Create GenerateRandomSlug()

Here you can find the source of GenerateRandomSlug()

Description

Generates a pseudo random 32 character string

License

Open Source License

Return

the random 32 character string

Declaration

public static String GenerateRandomSlug() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.UUID;

public class Main {
    /**/*from   w  w w.j  a  v a2s. c om*/
     * <p>
     * Generates a pseudo random 32 character string
     * </p>
     * 
     * @return the random 32 character string
     */
    public static String GenerateRandomSlug() {
        UUID uniqueSlug = UUID.randomUUID();
        return uniqueSlug.toString().replace("-", "");
    }
}

Related

  1. generateId()
  2. generateID()
  3. generateId()
  4. generateRandomMap(int count)
  5. generateRandomName()
  6. generateRandomString(int length)
  7. generateRandomTableName()
  8. generateRandomUUID()
  9. generateRandomUUID(final int length)