UUIDUtils.java
package com.imddy.sc.utils;
import java.util.UUID;
public class UUIDUtils {
/** 16位的UUID */
public static String getUUID16() {
return UUID.randomUUID().toString().replace("-","").substring(0,15);
}
/** 32位的UUID */
public static String getUUID32() {
return UUID.randomUUID().toString().replace("-","").substring(0,31);
}
}