java:使用StringBuilder在開頭插入 - java: use StringBuilder to insert at the beginning

問題:

I could only do this with String, for example:我只能用字符串來做到這一點,例如:

String str="";
for(int i=0;i<100;i++){
    str=i+str;
}

Is there a way to achieve this with StringBuilder?有沒有辦法用 StringBuilder 實現這一點? Thanks.謝謝。


解決方案:

參考: https://stackoom.com/en/question/OszV
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章