生成不重复的32为随机码

public static void main(String[] args) throws ParseException {
//random(2);
UUID.randomUUID().toString().replaceAll("-", "~~");
System.out.println( UUID.randomUUID().toString().replaceAll("-", ""));
}

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

f4751817162e4c18bae18a7a2a201e8c

posted @ 2014-10-09 09:39  也许还年轻  阅读(227)  评论(0编辑  收藏  举报