Here you can find the source of generateUUID()
public static String generateUUID()
//package com.java2s; //License from project: Open Source License import java.util.UUID; public class Main { /**// w w w . ja v a 2s . co m * This method generates a unique ID (UUID - Universally unique identifier) * * @return UUID as String */ public static String generateUUID() { // Creating a random UUID (Universally unique identifier). UUID uuid = UUID.randomUUID(); return uuid.toString(); } }