Java - Garbage collectors
1. Serial
-XX:+UseSerialGC JVM
2. Parallel
default
3. CMS(Current Markup Sweep)
-XX:+USeParNewGC
4. G1
–XX:+UseG1GC
Note: Java8 and G1 collector can optimize the string intern with the following option
-XX:+UseStringDeduplicationJVM
More information regarding G1:
https://www.infoq.com/articles/G1-One-Garbage-Collector-To-Rule-Them-All