What is garbage collection in the context of Java?

PYQ RPSC Programmer 2013

What is garbage collection in the context of Java?

  1. A.

    The operating system periodically deletes all of the java files available on the system.

  2. B.

    Any package imported in a program and not used is automatically deleted.

  3. C.

    When all references to an object are gone, the memory used by the object is automatically reclaimed.

  4. D.

    The JVM checks the output of any Java program and deletes anything that doesn't make sense.

Sign up free to check your answer

Sign up free

Explore the full course: Rpsc Programmer

Loading lesson…