| What are the memory heap and how many generations it is divided?
The memory heap are divided in three main generations are given below
(1)Generation 0:-This is mainly used to store short-lived objects. And Garbage Collection happens frequently in this Generation.
(2)Generation 1:-This will be happen for medium-lived objects. And objects that get moved from generation 0 are stored in this.
(3)Generation 2:-This will happen for long-lived objects. | | |