If circular link of two objects, then will it be garbage
collected ?
Answers were Sorted based on User's Feedback
Answer / rt
Yes it will be garbage collected.
e.g.
public void testMethod(){
A a= new A();
B b = new B();
a= b;
b= a;
}
After above method get executed Object a & b will be garbage
collected.
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / dhanunjay
I think not so,because that will be reused allocated memory for both....Here not to waste our memory
| Is This Answer Correct ? | 4 Yes | 7 No |
How do listeners work?
What is data and its types?
describe method overloading
What is finally and finalize in java?
What is a copy constructor in java?
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
0 Answers Akamai Technologies,
What is the blank final variable?
Why stringbuffer is faster than string?
Static Variable can referred in non-static method?
What is the differences between c++ and java? Explain
Can we inherit the constructor in a Class?please give one example.
How many bits is a double?