If circular link of two objects, then will it be garbage
collected ?
Answer Posted / 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 |
Post New Answer View All Answers
How can I debug the Java security exceptions and AccessControlExceptions?
How do you write methodology?
What is use of map in java?
What is meant by singleton class?
Difference between linkedlist and arraylist.
Is node a data type in java?
What is vector?
How does class forname work in java?
What is core java used for?
How does hashset work in java?
Why are constructors used?
what is object-oriented programming in java?
Is empty string in java?
what r advatages of websphere? & how to deploy?
What is the differences between heap and stack memory in java? Explain