---
title: "What does System.gc() and Runtime.gc() methods do ?"  
description: "What does System.gc() and Runtime.gc() methods do ?"  
author: "Anonymous User"  
published: 2015-01-14  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/2265/what-does-system-gc-and-runtime-gc-methods-do  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What does System.gc() and Runtime.gc() methods do ?

These methods can be used as a hint to the JVM, in order to start a garbage collection. However, this it is up to the Java Virtual Machine (JVM) to start the garbage collection immediately or later in time.

## Answers

### Answer by Anonymous User

These methods can be used as a hint to the JVM, in order to start a garbage collection. However, this it is up to the Java Virtual Machine (JVM) to start the garbage collection immediately or later in time.


---

Original Source: https://www.mindstick.com/interview/2265/what-does-system-gc-and-runtime-gc-methods-do

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
