What is Garbage Collector and how it works ? This article will help you to understand the basic concept of Garbage Collection like dangling pointer, memory leak and strategies to…