Memory management in JAVA

Answer Posted / srikanth

garbage collector ie gc is responsible for Memory
management in JAVA

whenever heap memory is full jvm makes list of objeects
which is unrefered and it calls finalize()method on that
method to cleanup resourse which is hold by it and finaaly
gc()method is invoked finally to relese the resource

Is This Answer Correct ?    29 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is finally block not called?

584


What are methods and how are they defined?

603


What are static blocks and static initalizers in java ?

587


Why generics are used in java?

554


How to sort an array from smallest to largest java?

548






How do weakhashmap works?

593


What are benefits of java?

562


Does java support Operator Overloading?

611


What is the difference between a checked and an unchecked exception?

553


Can we make constructors static?

729


What do the thread?class methods run() and start() do?

545


Write a java program to generate fibonacci series ?

575


What is the difference between method and means?

574


How to perform merge sort in java?

587


Can we override constructor in java?

581