Java OCA OCP Practice Question 306

Question

Which of the following are true about the Java garbage collector by the Java Platform?

  • A. It guarantees that Java programs will never run out of memory.
  • B. It executes as a low-priority, background thread.
  • C. It keeps track of which objects are reachable and unreachable.
  • D. It can be directed to garbage collect specific objects.


B and C.

Note

The garbage collector cannot prevent a program from running out of memory.

It executes as a low-priority background thread.

It keeps track of which objects are reachable and unreachable.

It cannot be directed to garbage collect an object.




PreviousNext

Related