If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
Answer / Narendra Kumar Gupta
No, setting an object reference to null does not immediately free the memory. The garbage collector only reclaims the memory when it determines that there are no more references pointing to the object and the object is no longer reachable.
| Is This Answer Correct ? | 0 Yes | 0 No |
What will happen when using pass by reference in java?
What is valid keyword in java?
How can we find size of the object ?
Why are functions called methods in java?
What is broken and continue statement?
what happens when we add the objects morethan the size limit to a hashmap
What is anagram of a string?
whats is the use of final,in which situation final can be used in the application?
What is the entry point in Java, and how is it written?
Is there any use of an abstract class which has no methods and no attributes?
What are parsers? Dom vs sax parser.
What is queue in java?