String与StringBuilder的互相转换

String与StringBuilder的互相转换

String转StringBulider

 StringBuilder sb = new StringBuilder();
        sb.append(username);

StringBulider转String

StringBuilder sb = new StringBuilder();
String s = sb.toString();
posted @ 2021-12-13 19:39  锅巴编程  阅读(838)  评论(0编辑  收藏  举报