字符串和StringBuilder之间的区别???? [英] Difference between string and StringBuilder????

查看:132
本文介绍了字符串和StringBuilder之间的区别????的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

字符串和字符串生成器有什么区别.
谁能告诉我这样做的好处和坏处.

What is the difference between string and string builder.
Can any one tell the advantages and disadvantages for this.

推荐答案

我的文章顶部StringBuilderPlus 解释了其中的一些区别.基本上,StringBuilder是可变的,而String是不可变的,因此在组合许多String时,StringBuilder可以更快.
The top of my article, StringBuilderPlus, explains some of the differences. Basically, StringBuilder is mutable and String is immutable, so StringBuilder can be faster when combining many Strings.


基本上,在对字符串进行许多修改时,StringBuilder类比String类更有效.有问题.抱歉,我没有足够的知识来进一步解释.
Basically, the StringBuilder class is more efficient than the String class when making many modifications to the string in question. I don''t have enough knowledge to explain it further, sorry.


这篇关于字符串和StringBuilder之间的区别????的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆