public String createRandom(int n){

StringBuffer str = new StringBuffer();

for(int i=0;i<n;i++){

if(i==0 && n>1){

str.append(new Random().nextInt(9)+1);

}else{

str.append(new Random().nextInt(10));

}

}

return str.toString();

}

posted on 2020-09-29 17:33  茫无所知  阅读(178)  评论(0编辑  收藏  举报