Sollicitatievraag bij Backbase

Explain how garbage collector works and how would you do memory profiling for java application.