Question - What are the different sorts of garbage collector generations?
Answer -
In the garbage collector, there are three generations:
- Generation 0: It represents a brand new object that has never been marked for collection.
- Generation 1: It identifies an object that has been designated as a collection but has not yet been removed.
- Generation 2: This indicates an object that has been swept by the Garbage Collector more than once.