生成一个uuid字符串,并去除多余的符号 for(int i=0;i<10;i++){ String uuid = UUID.randomUUID().toString().replaceAll("-", ""); System.out.println(uuid);}