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參數的,這個add方法默認會插入到list的最后一個。
2021-03-28
最新回答 / 慕無忌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