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 |
Can static method access instance variables ?
How do I start learning java?
Is a class an object?
Explain different ways of passing arguments to sub-routine?
write SQL command for table employee where print first name or last name start like "A" and who is working in domain(angular js,java,dotnet)
Can singleton class be serialized?
What is object-oriented paradigm?
What is the difference between length and length () in java?
If a multi threaded Java program has started numerous number of threads, at any point in time how to know which thread is currently executing/running ?
7 Answers Accenture, College School Exams Tests, iFlex, NIIT,
When should I use singleton?
how to make hashmap object as synchronized object?
How objects are stored in java?