首页 > 代码库 > String,StringBuffer,StringBuilder的区别

String,StringBuffer,StringBuilder的区别

StringBuffer和StringBuider的区别                                                                                                        

  StringBuffer是jdk1.0版本的,是线程安全的,效率低                                                                   

  StringBuilder是jdk1.5的,是线程不安全的,效率高                                                       

String和StringBuffer,StringBuilder的区别                                                         

  String是一个不可变的字符序列                                                                          

  StringBuffer,StringBuilder是可变的字符序列

String,StringBuffer,StringBuilder的区别