import java.util.ArrayList;
import java.util.List;

/**
 * @author 献
 * @company Goochine-深圳古辰创智科技有限公司
 * @website www.goochine.com
 * @tel 18271840547
 * @date 2017/4/20
 */
public class TestGC8 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<String>();
        System.gc();
        // 足够多的字符串
        for (Integer i = 0; i <= 1000000; i++) {
            String temp = new StringBuilder(i.toString()).toString();
            temp.intern();

            list.add(temp);
        }

        System.out.println("生成成功...");

    }
}
