The developer can force garbage collection by calling System.gc()
.
B.
Garbage collection cannot be forced by the developer.
The call to System.gc()
schedules garbage collection in the thread queue, but it is up to the Java Virtual Machine to allow the garbage collection to run.