1.

What happens to the thread when garbage collection kicks off?(a) The thread continues its operation(b) Garbage collection cannot happen until the thread is running(c) The thread is paused while garbage collection runs(d) The thread and garbage collection do not interfere with each otherThe question was asked in homework.I need to ask this question from Heap and Garbage Collection topic in chapter Classes and Methods of Java

Answer»

Right option is (C) The THREAD is PAUSED while garbage COLLECTION runs

Easiest explanation: The thread is paused when garbage collection runs which slows the application performance.



Discussion

No Comment Found

Related InterviewSolutions