Search This Blog

Showing posts with label Java Memory management. Show all posts
Showing posts with label Java Memory management. Show all posts

Monday, September 15, 2025

Java Garbage Collection

 One of the features of Java is auto-garbage collection. It frees the coder from keeping track of deallocating memory, though you can request garbage collection. 

Which of the following can request garbage collection?

a) Runtime.free()

b) Runtime.getRuntime().gc()

c) System.gc()

d) System.clear()


Created by Nancy K.A.N.

@12:46 15-09-2025