Appian Interview Question

How garbage collection works in the JVM