Java tutorial
//package com.java2s; import java.util.UUID; public class Main { public static String getUUIDString() { String UUIDString = UUID.randomUUID().toString(); String newUUIDString = UUIDString.replace("-", ""); String substring = newUUIDString.substring(0, 10); return substring; } }