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
What are the basic concepts of OOPS in java?
Can you override static methods?
Difference between == and .equals() ?
What are the uses of java?
Explain about the performance aspects of core java?
What is the difference between break and continue statements?
Difference between arraylist and vector.
What are the 8 primitive data types in java?
What is the basic of java?
What is appletviewer?
What are the 8 data types in java?
What is java thread dump, how can we get java thread dump of a program?
What are exceptions
What is "this" keyword in java? Explain
Can we override constructors in java?