0
点赞
收藏
分享

微信扫一扫

UUIDUtils工具类(uuid工具类)

腾讯优测 2023-06-29 阅读 89


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);
	}
	
}

举报

相关推荐

0 条评论