Can you explain the concept of Java memory management and how the garbage collector works?

Technical