String - StringBuffer - StringBuilder 效率对比

2016-6-24 流沙 JAVA

测试程序: package com.gyarmy.string; import java.util.ArrayList; import org.junit.Test; /* * StringBuffer 可变的字符序列 * */ public class TestStringBuffer { /* * StringBuilder 5.0以后加入, 线程不安全, 效率高于StringBuffer * */ @Test public void test2(){ //效率对比 //String,St...

阅读全文>>

标签: String StringBuffer StringBuilder

评论(0) 浏览(419)


Powered by 流沙团