Java tutorial
//package com.java2s; /** * FSML utility methods. * * @author BaseX Team 2005-11, BSD License * @author Alexander Holupirek */ import java.util.UUID; public class Main { /** * Generates UUID string. * * @param prefix string attached to uuid ('prefix', '-', 'uuid') * @return generated id as string */ public static String uuidString(final String prefix) { return prefix + "-" + UUID.randomUUID().toString(); } }