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 member in java?
What are parsers? Dom vs sax parser.
Discuss different types of errors that generally occur while programming.
Is it necessary that each try block must be followed by a catch block?
What are the OOPS concepts in Java ?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
can we create a instance for intwerface?
How many boolean functions are there?
What is a lock or purpose of locks in java?
What is array command?
How do I find and replace in word?
What is final keyword?