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 significance of continue jump statement? Explain with an example.
What are File and RandomAccessFile classes?
Difference between Choice and a List?
what is jndi?
What is anagram number?
How do you start a thread?
who can we create the object of a class? in how many ways we can create it (max 5)
What is parameter tag and what is its use?
What is difference between path and classpath variables?
What makes a function well defined?
byte a=5; byte b=5; byte c=a+b; System.out.println(c); whats the o/p?
What do you mean by exception handling in Java?