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...

What is the life-cycle of an object?

Answer Posted / chantiraji

Object creation
---------------
The operator new allocates storage in the heap and invokes a constructor method for initialization of the object.

Object deletion
---------------
The Java garbage collector runs in parallel (as a thread) with the executing program, so garbage collection is in some sense continuous in Java. A class can have a finalize method that is to be invoked (automatically) before deleting an object. This is useful in case there are any resources, such as an open file, that need to be released by the object before it is removed from the system.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we overload run() method in java?

1143


Explain differences between checked and unchecked exceptions in java?

1035


What are different type of exceptions in java?

930


What is the main difference between java platform and other platforms?

1014


Does every java program need a main?

957


What is arraylist e in java?

1018


How is abstraction implemented in java ?

931


What is data movement?

1084


What is complexity in java?

984


What is intern method in java?

1041


Can we override protected method in java?

1007


Why do we declare a class static?

1083


What is structure of java heap? What is perm gen space in heap?

1073


what is ststic with example

2017


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

947