您的位置:首页 > 产品设计 > UI/UE

JAVA菜鸟入门(2) StringBuilder vs StringBuffer,

2015-02-25 04:36 387 查看
1. StringBuilder vs StringBuffer.

from
stackoverflow

"
StringBuffer is synchronized
StringBuffer is thread-safe
StringBuffer is slow (try to write a sample program and execute it, it will take more time than StringBuilder)

StringBuilder is not synchronized
StringBuilder is not thread-safe
StringBuilder performance is better than StringBuffer.

Common thing : Both have same methods with same signatures. Both are mutable.
"

2. to be continued
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  FundamentalJava