Java tutorial
//package com.java2s; import java.util.UUID; public class Main { /** * Generates 32 char long UUID without "-" char, in regex pattern "[0-9a-f]". * * @return */ public static String generateUid() { return UUID.randomUUID().toString().replaceAll("-", ""); } }