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 |
What is the effect of keeping a constructor private?
write a program that list all permutations of ABCDEF in which A appears before B?
What is java jit compilers?
How can you write a loop indefinitely in java programming?
Why string is a class?
What is the purpose of the strictfp keyword?
Why object class is super class for every class in java?
Sample code to retrieve objects from HashMap in sorted ascending order?
How to sort numbers in java without array?
Urgent requirement of JAVA/.NET/QA in a CMMI level3 MNC for Pune location.
What is general methodology?
What is the difference between actual and formal parameters?