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 ?

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


Please Help Members By Posting Answers For Below Questions

How do you include a string in java?

1059


How do you add an element to a set in java?

1080


explain what is transient variable in java?

1191


What is the use of volatile in java?

1112


Does every java program need a main?

1033


Why is java called java?

1102


What is the use of flag?

1136


What are the differences between heap and stack memory in java?

1107


What are the object and class classes used for?

1092


How do you do math powers in java?

1123


How do you sort arrays in java?

990


When is update method called?

1196


What does null mean in java?

1132


What is formatted output in java?

1027


What do you mean by local variable and instance variable?

1004