GIAC
GSSP-JAVA · Question #266
Which of the following statements can be used by a Programmer to suggest the JVM to perform garbage collection?
The correct answer is D. System.gc(). See the full explanation below for the reasoning.
Question
Which of the following statements can be used by a Programmer to suggest the JVM to perform garbage collection?
Options
- ARuntime.getRuntime().freeMemory();
- BRuntime.getRuntime().totalMemory();
- Cnew Thread().destroy();
- DSystem.gc();
- ESystem.runFinalization();
- FSystem.setOut();
How the community answered
(29 responses)- A3% (1)
- C7% (2)
- D79% (23)
- E10% (3)
Community Discussion
No community discussion yet for this question.