package com.saye.hrs.commons.uuid;

import java.util.UUID;

public class UUIDGenerator { 
    public UUIDGenerator() { 
    } 
    /** 
     * 获得一个UUID 
     * @return String UUID 
     */ 
    public static String getUUID(){ 
        String s = UUID.randomUUID().toString(); 
        //去掉“-”符号 
        return s.substring(0,8)+s.substring(9,13)+s.substring(14,18)+s.substring(19,23)+s.substring(24); 
    } 

    public static void main(String[] args){ 
    	
        String ss = UUIDGenerator.getUUID();
        System.out.println(ss);
        System.out.println(ss.length());
    } 
}   