JVM GC 收集器测试笔记

测试代码

public static void main(String[] args)throws Exception {
    String str = "kkkk";
    while (true){
        str += str + new Random().nextInt(888888888) + new Random().nextInt(777777777);
        str.intern();
    }
}

jvm启动参数

-Xmx10m -XX:+PrintCommandLineFlags -XX:+PrintGCDetails

-XX:+PrintCommandLineFlags 激活输出命令
-XX:+PrintGCDetails 输出GC日志详情

串行收集器 UseSerialGC

-XX:UseSerialGC DefNew,Tenured
新生代使用 DefNew 老年带使用 Tenured 新生代老年代均使用的是单线程收集器
下面是GC日志

[GC (Allocation Failure) [DefNew: 2752K->320K(3072K), 0.0041357 secs] 2752K->747K(9920K), 0.0041882 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
[GC (Allocation Failure) [DefNew: 2873K->320K(3072K), 0.0015355 secs] 3300K->1327K(9920K), 0.0015660 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [DefNew: 2808K->173K(3072K), 0.0008348 secs] 3815K->2022K(9920K), 0.0008664 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [DefNew: 2329K->0K(3072K), 0.0015649 secs] 4178K->3414K(9920K), 0.0016182 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [DefNew: 1433K->0K(3072K), 0.0016421 secs] 4847K->4805K(9920K), 0.0016990 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [DefNew: 1391K->0K(3072K), 0.0014246 secs][Tenured: 6196K->3143K(6848K), 0.0043646 secs] 6197K->3143K(9920K), [Metaspace: 3295K->3295K(1056768K)], 0.0058466 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
[GC (Allocation Failure) [DefNew: 1492K->1492K(3072K), 0.0000163 secs][Tenured: 5926K->2396K(6848K), 0.0040296 secs] 7418K->2396K(9920K), [Metaspace: 3296K->3296K(1056768K)], 0.0040972 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[GC (Allocation Failure) [DefNew: 1468K->0K(3072K), 0.0004864 secs][Tenured: 5179K->5179K(6848K), 0.0027931 secs] 6647K->5179K(9920K), [Metaspace: 3297K->3297K(1056768K)], 0.0033357 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure) [Tenured: 5179K->4836K(6848K), 0.0030389 secs] 5179K->4836K(9920K), [Metaspace: 3297K->3297K(1056768K)], 0.0030668 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:674)
	at java.lang.StringBuilder.append(StringBuilder.java:208)
	at my.base.tree.SortTest.main(SortTest.java:43)
Heap
 def new generation   total 3072K, used 79K [0x00000000ff600000, 0x00000000ff950000, 0x00000000ff950000)
  eden space 2752K,   2% used [0x00000000ff600000, 0x00000000ff613ce8, 0x00000000ff8b0000)
  from space 320K,   0% used [0x00000000ff900000, 0x00000000ff900000, 0x00000000ff950000)
  to   space 320K,   0% used [0x00000000ff8b0000, 0x00000000ff8b0000, 0x00000000ff900000)
 tenured generation   total 6848K, used 4836K [0x00000000ff950000, 0x0000000100000000, 0x0000000100000000)
   the space 6848K,  70% used [0x00000000ff950000, 0x00000000ffe090e8, 0x00000000ffe09200, 0x0000000100000000)
 Metaspace       used 3327K, capacity 4556K, committed 4864K, reserved 1056768K
  class space    used 360K, capacity 392K, committed 512K, reserved 1048576K
Disconnected from the target VM, address: '127.0.0.1:33323', transport: 'socket'

ParNew 新生并行收集器

-XX:+UseParNewGC ParNew,Tenured
新生代使用多线程收集器ParNew,老年带依旧使用单线程的收集器Tenured

Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release

[GC (Allocation Failure) [ParNew: 2752K->320K(3072K), 0.0012250 secs] 2752K->779K(9920K), 0.0012703 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 2884K->320K(3072K), 0.0014334 secs] 3343K->1401K(9920K), 0.0014745 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[GC (Allocation Failure) [ParNew: 2904K->214K(3072K), 0.0029523 secs] 3986K->2135K(9920K), 0.0029915 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 2378K->4K(3072K), 0.0025237 secs] 4299K->3525K(9920K), 0.0025634 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 1453K->4K(3072K), 0.0030885 secs] 4973K->4931K(9920K), 0.0031291 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 1457K->4K(3072K), 0.0019989 secs][Tenured: 6334K->3292K(6848K), 0.0029650 secs] 6384K->3292K(9920K), [Metaspace: 3295K->3295K(1056768K)], 0.0050110 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[GC (Allocation Failure) [ParNew: 1455K->1455K(3072K), 0.0000128 secs][Tenured: 6106K->2420K(6848K), 0.0040983 secs] 7562K->2420K(9920K), [Metaspace: 3296K->3296K(1056768K)], 0.0041691 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 1485K->0K(3072K), 0.0006954 secs][Tenured: 5234K->5234K(6848K), 0.0027892 secs] 6719K->5234K(9920K), [Metaspace: 3297K->3297K(1056768K)], 0.0035371 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure) [Tenured: 5234K->4882K(6848K), 0.0032087 secs] 5234K->4882K(9920K), [Metaspace: 3297K->3297K(1056768K)], 0.0032438 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:674)
	at java.lang.StringBuilder.append(StringBuilder.java:208)
	at my.base.tree.SortTest.main(SortTest.java:43)
Heap
 par new generation   total 3072K, used 107K [0x00000000ff600000, 0x00000000ff950000, 0x00000000ff950000)
  eden space 2752K,   3% used [0x00000000ff600000, 0x00000000ff61aef8, 0x00000000ff8b0000)
  from space 320K,   0% used [0x00000000ff900000, 0x00000000ff900000, 0x00000000ff950000)
  to   space 320K,   0% used [0x00000000ff8b0000, 0x00000000ff8b0000, 0x00000000ff900000)
 tenured generation   total 6848K, used 4882K [0x00000000ff950000, 0x0000000100000000, 0x0000000100000000)
   the space 6848K,  71% used [0x00000000ff950000, 0x00000000ffe14aa0, 0x00000000ffe14c00, 0x0000000100000000)
 Metaspace       used 3326K, capacity 4556K, committed 4864K, reserved 1056768K
  class space    used 360K, capacity 392K, committed 512K, reserved 1048576K
Disconnected from the target VM, address: '127.0.0.1:41227', transport: 'socket'

PS:

Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release 

jvm 的警告后期将被移除,不推荐这种方式使用

ParallelGC 并行收集器

-XX:+UseParallelGC 新生代 PSYoungGen,老年代ParOldGen
新生代,老年代均使用并行的收集器
就是 那个传说中的吞吐量优先的收集器 jdk1.8的默认收集器
串行收集器,在新生代和老年代的并行化

➜  ~ ./opt/common/jdk1.8.0_201/bin/java -XX:+PrintCommandLineFlags -version
-XX:InitialHeapSize=113587520 -XX:MaxHeapSize=1817400320 -XX:+PrintCommandLineFlags -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC 
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

可以看出默认就是使用 并行收集器,jvm编译模式默认使用的是混合模式,
初始堆大小大约是108MB,最大堆约为1.7G 由于本机内存8G 所以25% 加上操作系统内存使用一部分大约是这个大小

-XX:InitialHeapSize=10485760 -XX:MaxHeapSize=10485760 -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC 
[GC (Allocation Failure) [PSYoungGen: 2005K->495K(2560K)] 2005K->777K(9728K), 0.0014090 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 2532K->504K(2560K)] 2815K->1024K(9728K), 0.0029876 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 2478K->448K(2560K)] 2998K->1848K(9728K), 0.0025280 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 1895K->432K(2560K)] 4703K->3592K(9728K), 0.0025333 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 1879K->432K(2560K)] 6447K->5703K(9728K), 0.0012289 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 432K->448K(1536K)] 5703K->5719K(8704K), 0.0013510 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure) [PSYoungGen: 448K->0K(1536K)] [ParOldGen: 5271K->2877K(6656K)] 5719K->2877K(8192K), [Metaspace: 3046K->3046K(1056768K)], 0.0059619 secs] [Times: user=0.01 sys=0.01, real=0.01 secs] 
[GC (Allocation Failure) [PSYoungGen: 20K->32K(2048K)] 7121K->7132K(9216K), 0.0009097 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Ergonomics) [PSYoungGen: 32K->0K(2048K)] [ParOldGen: 7100K->1978K(7168K)] 7132K->1978K(9216K), [Metaspace: 3047K->3047K(1056768K)], 0.0090879 secs] [Times: user=0.03 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [PSYoungGen: 40K->0K(2048K)] 6243K->6202K(9216K), 0.0013115 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Ergonomics) [PSYoungGen: 0K->0K(2048K)] [ParOldGen: 6202K->4793K(7168K)] 6202K->4793K(9216K), [Metaspace: 3047K->3047K(1056768K)], 0.0135954 secs] [Times: user=0.05 sys=0.00, real=0.01 secs] 
[GC (Allocation Failure) [PSYoungGen: 0K->0K(2048K)] 4793K->4793K(9216K), 0.0006726 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure) [PSYoungGen: 0K->0K(2048K)] [ParOldGen: 4793K->4774K(7168K)] 4793K->4774K(9216K), [Metaspace: 3047K->3047K(1056768K)], 0.0076364 secs] [Times: user=0.04 sys=0.00, real=0.01 secs] 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:674)
	at java.lang.StringBuilder.append(StringBuilder.java:208)
	at my.base.tree.SortTest.main(SortTest.java:43)
Heap
 PSYoungGen      total 2048K, used 61K [0x00000000ffd00000, 0x0000000100000000, 0x0000000100000000)
  eden space 1024K, 5% used [0x00000000ffd00000,0x00000000ffd0f408,0x00000000ffe00000)
  from space 1024K, 0% used [0x00000000ffe00000,0x00000000ffe00000,0x00000000fff00000)
  to   space 1024K, 0% used [0x00000000fff00000,0x00000000fff00000,0x0000000100000000)
 ParOldGen       total 7168K, used 4774K [0x00000000ff600000, 0x00000000ffd00000, 0x00000000ffd00000)
  object space 7168K, 66% used [0x00000000ff600000,0x00000000ffaa9868,0x00000000ffd00000)
 Metaspace       used 3078K, capacity 4500K, committed 4864K, reserved 1056768K
  class space    used 334K, capacity 388K, committed 512K, reserved 1048576K

CMS 收集器

-XX:+UseConcMarkSweepGC

-Xmx10m
-XX:+PrintCommandLineFlags
-XX:+PrintGCDetails
-XX:+UseConcMarkSweepGC

根据下面的输出可以看出,默认新生代使用的是ParNew
新生代ParNew,老年代CMS,和serialOld备用,(当触发CMS回收失败时serialOld进行FullGC)
根据下面的GC日志可以看出,新生代有多次GC,但是老年代有

  • CMS的初始标记(CMS Initial Mark) 标记GCRoot对象 触发STW(Stop the World)
  • CMS的并发标记(CMS-concurrent-mark/CMS-concurrent-preclean) 根据GCRoot对象查询存活对象,不触发STW
  • CMS的重新标记(CMS Final Remark) 修正用户线程执行后一部分对象标记变动部分的对象,触发STW
  • CMS的并发收集(CMS-concurrent-sweep-start) 进行并发的标记清除不触发STW
  • 因为CMS回收失败(concurrent mode failure)导致触发了一次serialOld的 FullGC
-XX:InitialHeapSize=10485760 -XX:MaxHeapSize=10485760 -XX:MaxNewSize=3497984 -XX:MaxTenuringThreshold=6 -XX:NewSize=3497984 -XX:OldPLABSize=16 -XX:OldSize=6987776 -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC 
[GC (Allocation Failure) [ParNew: 2752K->320K(3072K), 0.0043925 secs] 2752K->749K(9920K), 0.0044383 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] 
[GC (Allocation Failure) [ParNew: 2807K->282K(3072K), 0.0012632 secs] 3236K->1641K(9920K), 0.0013030 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 2463K->179K(3072K), 0.0010003 secs] 3822K->2585K(9920K), 0.0011649 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 2325K->150K(3072K), 0.0062861 secs] 4731K->3254K(9920K), 0.0063258 secs] [Times: user=0.02 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 2297K->2297K(3072K), 0.0000168 secs][CMS: 5895K->4281K(6848K), 0.0041875 secs] 8192K->4281K(9920K), [Metaspace: 3049K->3049K(1056768K)], 0.0042492 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[GC (CMS Initial Mark) [1 CMS-initial-mark: 4281K(6848K)] 5677K(9920K), 0.0010928 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-mark-start]
[CMS-concurrent-mark: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-preclean-start]
[CMS-concurrent-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (CMS Final Remark) [YG occupancy: 1395 K (3072 K)][Rescan (parallel) , 0.0050703 secs][weak refs processing, 0.0000114 secs][class unloading, 0.0003629 secs][scrub symbol table, 0.0004989 secs][scrub string table, 0.0002099 secs][1 CMS-remark: 4281K(6848K)] 5677K(9920K), 0.0062555 secs] [Times: user=0.02 sys=0.00, real=0.00 secs] 
[CMS-concurrent-sweep-start]
[GC (Allocation Failure) [ParNew: 1449K->6K(3072K), 0.0083512 secs] 5731K->5686K(9920K), 0.0083976 secs] [Times: user=0.03 sys=0.00, real=0.01 secs] 
[CMS-concurrent-sweep: 0.000/0.009 secs] [Times: user=0.03 sys=0.00, real=0.01 secs] 
[CMS-concurrent-reset-start]
[CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 1455K->1455K(3072K), 0.0000295 secs][CMS: 5679K->3366K(6848K), 0.0038146 secs] 7135K->3366K(9920K), [Metaspace: 3050K->3050K(1056768K)], 0.0039022 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
[GC (CMS Initial Mark) [1 CMS-initial-mark: 6158K(6848K)] 6158K(9920K), 0.0002560 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
[CMS-concurrent-mark-start]
[CMS-concurrent-mark: 0.001/0.001 secs] [Times: user=0.00 sys=0.01, real=0.00 secs] 
[GC (Allocation Failure) [ParNew: 108K->0K(3072K), 0.0008700 secs][CMS (concurrent mode failure): 6158K->4759K(6848K), 0.0047472 secs] 6266K->4759K(9920K), [Metaspace: 3050K->3050K(1056768K)], 0.0056658 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[Full GC (Allocation Failure) [CMS: 4759K->4739K(6848K), 0.0060336 secs] 4759K->4739K(9920K), [Metaspace: 3050K->3050K(1056768K)], 0.0060798 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:674)
	at java.lang.StringBuilder.append(StringBuilder.java:208)
	at my.base.tree.SortTest.main(SortTest.java:43)
Heap
 par new generation   total 3072K, used 108K [0x00000000ff600000, 0x00000000ff950000, 0x00000000ff950000)
  eden space 2752K,   3% used [0x00000000ff600000, 0x00000000ff61b310, 0x00000000ff8b0000)
  from space 320K,   0% used [0x00000000ff8b0000, 0x00000000ff8b0000, 0x00000000ff900000)
  to   space 320K,   0% used [0x00000000ff900000, 0x00000000ff900000, 0x00000000ff950000)
 concurrent mark-sweep generation total 6848K, used 4739K [0x00000000ff950000, 0x0000000100000000, 0x0000000100000000)
 Metaspace       used 3082K, capacity 4500K, committed 4864K, reserved 1056768K
  class space    used 334K, capacity 388K, committed 512K, reserved 1048576K

G1 收集器

-XX:+UseG1GC G1的收集器日志就比较难看懂了
PS:此处使用的是 -XX:+PrintGC ,并非输出详细的GC日志

-XX:InitialHeapSize=10485760 -XX:MaxHeapSize=10485760 -XX:+PrintCommandLineFlags -XX:+PrintGC -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC 
[GC pause (G1 Evacuation Pause) (young) 6845K->1543K(10M), 0.0036973 secs]
[GC pause (G1 Humongous Allocation) (young) (initial-mark) 4099K->3149K(10M), 0.0018058 secs]
[GC concurrent-root-region-scan-start]
[GC concurrent-root-region-scan-end, 0.0001577 secs]
[GC concurrent-mark-start]
[GC concurrent-mark-end, 0.0007880 secs]
[GC remark, 0.0009967 secs]
[GC cleanup 4644K->4644K(10M), 0.0002827 secs]
[GC pause (G1 Humongous Allocation) (young) 6117K->5337K(10M), 0.0011350 secs]
[Full GC (Allocation Failure)  5337K->2645K(9216K), 0.0035573 secs]
[GC pause (G1 Humongous Allocation) (young) (initial-mark) 5544K->4060K(9216K), 0.0011118 secs]
[GC concurrent-root-region-scan-start]
[GC concurrent-root-region-scan-end, 0.0001094 secs]
[GC concurrent-mark-start]
[GC concurrent-mark-end, 0.0007250 secs]
[GC remark, 0.0009093 secs]
[GC cleanup 5494K->5494K(9216K), 0.0002340 secs]
[GC pause (G1 Humongous Allocation) (young) 5494K->5469K(10M), 0.0012336 secs]
[Full GC (Allocation Failure)  5476K->1945K(8192K), 0.0047079 secs]
[GC pause (G1 Humongous Allocation) (young) (initial-mark) 3362K->3355K(8192K), 0.0124455 secs]
[GC concurrent-root-region-scan-start]
[GC pause (G1 Humongous Allocation) (young)[GC concurrent-root-region-scan-end, 0.0001951 secs]
[GC concurrent-mark-start]
 3355K->3355K(9216K), 0.0055768 secs]
[GC concurrent-mark-end, 0.0065283 secs]
[Full GC (Allocation Failure)  3355K->3349K(10M), 0.0029805 secs]
[GC remark, 0.0000100 secs]
[GC concurrent-mark-abort]
[GC pause (G1 Humongous Allocation) (young) (initial-mark) 6222K->4761K(10M), 0.0011473 secs]
[GC concurrent-root-region-scan-start]
[GC concurrent-root-region-scan-end, 0.0001157 secs]
[GC concurrent-mark-start]
[GC pause (G1 Humongous Allocation) (young) 4766K->4759K(10M), 0.0007656 secs]
[Full GC (Allocation Failure)  4759K->4753K(10M), 0.0032941 secs]
[Full GC (Allocation Failure)  4753K->4734K(10M), 0.0067159 secs]
[GC concurrent-mark-abort]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:674)
	at java.lang.StringBuilder.append(StringBuilder.java:208)
	at my.base.tree.SortTest.main(SortTest.java:43)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值