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 |
how do you store phone numbers using java collections
What is Distributed Application and what is its usage?
What is the difference between yielding and sleeping in java programming?
Is java still necessary?
What language is pass by reference?
What value is a variable of the string type automatically initialized?
What is your platform?s default character encoding and how to know this?
Is java util list serializable?
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
What is the difference between the >> and >>> operators?
class A { public void disp(int a,int b) { System.out.println("hai"); } } class B { public void disp(int a,int b,int c) { System.out.println("hai"); } } above program is overloading or overriding?
What is module in project?