# Which collector does the JVM pick when you name none? (emulating a 1, 2 and 4 CPU machine with -XX:ActiveProcessorCount)

## JDK 25: OpenJDK Runtime Environment Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS)
$ java -XX:ActiveProcessorCount=1 Which
collector MXBeans      : Copy | MarkSweepCompact
$ java -XX:ActiveProcessorCount=2 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation
$ java -XX:ActiveProcessorCount=4 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation

## JDK 27: OpenJDK Runtime Environment Temurin-27.0.1.1+4 (build 27.0.1.1+4)
$ java -XX:ActiveProcessorCount=1 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation
$ java -XX:ActiveProcessorCount=2 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation
$ java -XX:ActiveProcessorCount=4 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation

## JDK 28: OpenJDK Runtime Environment Temurin-28+25-202611191755 (build 28-beta+25-ea)
$ java -XX:ActiveProcessorCount=1 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation
$ java -XX:ActiveProcessorCount=2 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation
$ java -XX:ActiveProcessorCount=4 Which
collector MXBeans      : G1 Young Generation | G1 Concurrent GC | G1 Old Generation
