When is an object in the mean to garbage collection?
Answer Posted / chandrarekha
whenever the object goes out of scope or when it is no
longer being referenced, in such cases it can be a garbage
object. Garbage collection is implicitly invoked whenever
resources have to be allocated to the new objects that are
created and approach to detect a garbage object can be done
through reference-counting collectors,tracing
collectors,compacting collectors. The garbage collectors
can also be explicitly invoked by gc() supported by JVM
which is in the java.lang package
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the synonym of framework?
What carriage return means?
What is binary tree in java?
What is unicode full form?
What are the differences between the constructors and methods?
What are Normalization Rules? Define Normalization?
Explain jdk, jre and jvm?
What is empty list in java?
What are wrapper classes in java?
How arrays are stored in memory in java?
How many characters is 16 bytes?
How many types of voids are there?
Why multiple inheritance is not supported by java?
What are some alternatives to inheritance?
Is object a data type in java?