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

When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

1151


What 5 doubled?

1048


What is set in java?

1107


How many threads does a core java have?

1129


What is the structure of java?

1080


List down the methods and interfaces of collection class in java.

1040


What is size of int in java?

1104


What is method overloading with type promotion?

1345


How to change the priority of thread or how to set priority of thread?

1076


What are the differences between checked exception and unchecked exception?

1019


Who found java?

1028


Why does java have different data types for integers and floating-point values?

1067


What is palindrome in java?

1044


What is the length of a string?

1086


What is the return type of the main method?

1091