系统自动生成ID(比UUID.radom().tostring()要好看)
public class test1 { public static void main(String[] args) { char[] para = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9'}; String result = new String(); for(int i =0;i<32;i++){ int c = new Random().nextInt(35); result += String.valueOf(para[c]); } System.out.println(result); } }