2019-04-26随机4位动态码

public class Shiyong {
    public static void main(String[] args) {
                String agString="";
                      String []ac= {"1","a","b","2","c","3","5","d","4","e","f","6","g","h","7","i"};
                                   for (int p=0;p<4;p++){
                                      double d=Math.random();
                                                                                        int c =(int)(d*16);
                                            agString+=ac[c];
            
            
        }                                           System.out.println(agString);
    }
}

你可能感兴趣的:(2019-04-26随机4位动态码)