最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

終于被我搞定了,有什么不好的請(qǐng)望大神幫我指導(dǎo)下

public void randomtest(){
?? ??? ?
?? ??? ?List<String> randomlist=new ArrayList<String>();
?? ??? ?
?? ??? ?for(int j=0;j<10;++j){
?? ??? ??? ?Random random1=new Random();
?? ??? ??? ?int lenght=random1.nextInt(10);//讓每個(gè)字符的長(zhǎng)度小于一個(gè)隨機(jī)數(shù),這個(gè)隨機(jī)數(shù)小于10
?? ??? ??? ?String charall="";//每次執(zhí)行新的循環(huán)時(shí)讓charall重新置為“”;
?? ??? ??? ??? ?for(int i=0;i<=lenght;++i){?? ??? ??? ?
?? ??? ??? ??? ?Random random=new Random();
?? ??? ??? ??? ?int? num;
?? ??? ??? ??? ?do{
?? ??? ??? ??? ??? ?num=random.nextInt(122);
?? ??? ??? ??? ?}while(num<48||num>57&&num<65||num>90&&num<97||num>122);?? ??? ??? ??? ??? ??? ??? ???? //保證輸出的都是數(shù)字或者字母


? ??? ??? ????
?? ??? ??? ??? ?char a1=(char)num;
?? ??? ??? ??? ?charall=charall+a1;??? ??? ??? ?
?? ??? ??? ??? ?}
?? ??? ??? ??? ?randomlist.add(charall);?? ??? ??? ?
?? ??? ??? ?}

?????? //還沒排序之前,打印List中的每個(gè)數(shù)
?? ??? ?System.out.println("-----------排序前-----------");
?? ??? ?for (String string : randomlist) {
?? ??? ??? ?System.out.println("將要添加字符串"+string);
?? ??? ??? ?}
?? ??? ?//排序之后
?? ??? ?System.out.println("-----------排序后-----------");
?? ??? ?Collections.sort(randomlist);
?? ??? ?for (String string : randomlist) {
?? ??? ??? ?System.out.println("將要添加字符串"+string);
?? ??? ??? ?}
?? ??? ?
?? ?}

正在回答

1 回答

不錯(cuò),給我積分把哈啊哈

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

菠蘿哥傷不起 提問者

非常感謝!
2016-11-17 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

終于被我搞定了,有什么不好的請(qǐng)望大神幫我指導(dǎo)下

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)