Java examples for java.util:UUID
get Unique Cid via UUID
//package com.java2s; import java.util.UUID; public class Main { public static void main(String[] argv) throws Exception { System.out.println(getUniqueCid()); }/* www.j a va 2s . c o m*/ private static long salt = 0; public static String getUniqueCid() { salt++; return UUID.randomUUID().toString() + String.valueOf(salt); } }