When is an object in the mean to garbage collection?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sathya
When the object is no longer referenced, its eligible for
Garbage Collection
| Is This Answer Correct ? | 0 Yes | 1 No |
what are the disadvantages of indexes in oracle?
0 Answers 3i Infotech, Wells Fargo,
Why runnable interface is used in java?
What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?
Why javac is not recognized?
What is a class object?
Is zero a positive integer?
What is a stringbuffer?
How do you remove all elements from an arraylist in java?
How to read and write image from a file ?
How use .contains in java?
What will be the output of round(3.7) and ceil(3.7)?
why Runnable interface is preferable than extending the Thread class?
7 Answers Aizza, College School Exams Tests, Sybrant Technologies, Wipro,