nerdexam
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)
  • A
    3% (1)
  • C
    7% (2)
  • D
    79% (23)
  • E
    10% (3)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice