What is the purpose of garbage collection in Java, and when is it used? Technology Community › Category: Java › What is the purpose of garbage collection in Java, and when is it used? 0 Vote Up Vote Down VietMX Staff asked 4 years ago The purpose of garbage collection is to identify and discard those objects that are no longer needed by the application, in order for the resources to be reclaimed and reused.