Question: what is the difference between young generation and old generation in java?
Answer: Often a threshold is set for the young generation to be considered old generation and moved to Tenured part of the heap memory. The old generation is used to store long-lived objects. Eventually, the old generation also needs to be garbage collected and this is called the major garbage collection.