Sunday 19 March 2017

Where is the object stored in java?

Whenever an object is created in java, it gets storage space in heap.

Heap is created when JVM starts. And it increases or decreases in size as per the requirement while the application runs.

At times when heap space becomes full or approaches to be full, the garbage collection starts.

Heap can be divided into two generations:

  • nursery
  • old space
To learn more, about nursery and old space follow this link

You may also want to know about:

No comments:

Post a Comment

If you are looking for a reference book on java then we recommend you to go for → Java The Complete Reference
Click on the image link below to get it now.