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

What is OOP Language?

1054


Give an example of use of pointers in java class.

1008


How do you make a thread in java?

1080


What is private protected in java?

1021


Where and how can you use a private constructor?

971


What is the difference between abstraction and encapsulation?

1026


What is consumer in java?

953


How many types of the indexof method are there for strings?

956


What is a java object and java application?

1029


How to avoid memory leak in java?

1111


What is a copy constructor in java?

1098


What is difference between static class and singleton pattern?

1007


What is the difference between heap memory and stack memory?

1042


Is it possible to override the main method?

958


Is static variable stored in heap?

973