Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If circular link of two objects, then will it be garbage
collected ?

Answers were Sorted based on User's Feedback



If circular link of two objects, then will it be garbage collected ?..

Answer / uppaluri

No

Is This Answer Correct ?    7 Yes 1 No

If circular link of two objects, then will it be garbage collected ?..

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

If circular link of two objects, then will it be garbage collected ?..

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

Post New Answer

More Core Java Interview Questions

How is the marker interface used in Java?

0 Answers   BirlaSoft,


what is jms? features of jms

2 Answers   CTS,


What is an object in java and how is it created?

0 Answers  


When is the finally clause of a try-catch-finally statement executed?

0 Answers  


Is empty list java?

0 Answers  


why java does not support unsigned keyword?

1 Answers  


we cannot create an object of interface but we can create a variable of it

1 Answers  


why java does compile time polymorphism at run time ?

6 Answers   CTS, TCS,


What is return code?

0 Answers  


How OOPS concept is achieved in Java?

6 Answers   Cognizant, JPMorgan Chase, Xavient,


Why do we need variables?

0 Answers  


Which method returns the length of a string?

0 Answers  


Categories