Multiple choice

Which of the following is/are true about garbage collection in java?

  1. We can not force garbage collection mechanism in java.

  2. JVM uses finalize() method before destroy the unused objects.

  3. JVM uses system.gc() method to collect the unused memory objects.

  4. All the above are true

  5. Option (1) and (2) only

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Yes,  all of the above three a statements determines the exact explanation of the garbage collection process in java.