104k views
2 votes
Normally you depend on the JVM to perform garbage collection automatically. However, you can explicitly use ________ to request garbage collection.

1 Answer

5 votes

Answer:

System.gc()

Step-by-step explanation:

System.gc() can be defined as the method which can be used to effectively request for garbage collection because they runs the garbage collector, which in turn enables JMV which is fully known as JAVA VIRTUAL MACHINE to claim back the already unused memory space of the objects that was discarded for quick reuse of the memory space , although Java virtual machine often perform garbage collection automatically.

User Joohwan
by
5.3k points