Question - What are the types of generations in garbage collector?
Answer -
There are three types of generations in garbage collector.
Generation 0 – This identifies a newly created object that has been never marked for collection.
Generation 1 – This identifies an object which has been marked as collection but not removed.
Generation 2 – This identifies an object that has survived more than one sweep of the Garbage collector.