Search Interview Questions | Click here and help us by providing the answer. Click Correct / Improve and please let us know. |
|
|||
|
| ||||
| Core Java - Interview Questions and Answers for 'Strong reference' - 1 question(s) found - Order By Rating | ||||
| ||||
| Ans. Garbage Collector wont remove a strong reference. A soft reference will only get removed if memory is low. A weak reference will get removed on the next garbage collection cycle. A phantom reference will be finalized but the memory will not be reclaimed. Can be useful when you want to be notified that an object is about to be collected. | ||||