Java uses an automatic memory management system called a garbage collector. Whereas in other programming languages such as C the programmer has direct access to the memory who allocates memory in his code, thereby creating a lot of scope for leaks Why programmer should know about memory management? To make high performance based programs. If we …