int i = str.length();
int s = 0;
while (i>=0){
if(s == 3){
s = 0;
str.insert(i,",");
i--;
} else {
i--;
s++;
}
}
int s = 0;
while (i>=0){
if(s == 3){
s = 0;
str.insert(i,",");
i--;
} else {
i--;
s++;
}
}
2021-03-29
最新回答 / weixin_慕斯卡1235979
<...圖片...>add方法有兩個重載,可以看到其中一個add重載方法是不需要傳入index參數(shù)的,這個add方法默認(rèn)會插入到list的最后一個。
2021-03-28
最贊回答 / 慕數(shù)據(jù)9578232
try里面的執(zhí)行? 執(zhí)行到會報錯的地方就停止了? try塊里面報錯之后的代碼不執(zhí)行 繼而執(zhí)行相應(yīng)catch里的代碼
最新回答 / 慕無忌0531652
?boolean?exit?=?false;if(i)?{?System.out.println("已找到《"?+?bookData.name?+?"》,編號:"?+?bookData.id);??exit?=?true;}? ? ? ? ? ? ? ? ? ? ?if(!exit){?System.out.println("sorry,?no?fund");?}!exit 是非真還是非假?
2021-03-11
+ 我來回答
回答最高可+2積分