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; import java.util.Random; public class Main { public static String generateUUID() { new UUID(new Random().nextLong(), new Random().nextLong()); UUID generatedUUID = UUID.randomUUID(); return generatedUUID.toString(); }/* www . j ava 2s. c o m*/ }