Java examples for java.util:UUID
Create a new UUID
//package com.java2s; import java.util.UUID; public class Main { public static void main(String[] argv) throws Exception { System.out.println(getUUID()); }/*from w w w . jav a 2 s . co m*/ /** * Create a new UUID * @return the uuid as a string */ public static String getUUID() { return UUID.randomUUID().toString(); } }