In C you must free memory yourself, and forgetting causes leaks and crashes. Java's garbage collector finds objects nothing can reach any more and frees them for you. Knowing when an object becomes eligible helps you spot leaks, like objects kept alive in a static list. You cannot force a collection, since System.gc() is only a request, and interviewers often ask exactly that.