answersLogoWhite

0


Best Answer

When all references to an object is Java are gone, the garbage collector will come along and free up the memory used by that object.

Every Java object has a method named finalize, which is called by the garbage collector when the memory for that object is being deallocated. "Finalization" is just a name given to the act of calling the finalize method during garbage collection.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between garbage collector and finalization?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

What is the difference between a weak reference and a strong reference in python?

The same difference as in other languages. A weak reference is one that won't stop the garbage collector from eliminating an object.


In c garbage collector?

No.


How garbage collector works on anonymous class in java?

about the garbage collector it is in java and it is mainly responsible for dynamic memory manegement


What is the difference between garbage and rubbish?

rubbish , from kitchen


Who performs the garbage collection?

A garbage truck. In computer programming, a process known as the garbage collector.


What actors and actresses appeared in The Garbage Collector - 2010?

The cast of The Garbage Collector - 2010 includes: Justin Huen Jamie Wollrab


How much does a garbage collector make in Orlando fl?

In Orlando, Florida, the average annual income for a garbage collector is $23,000. The average annual income for a garbage collector in Jackson, Tennessee is $25,000.


What is mean by garbage?

Garbage collected means that the memory used by an object has been reclaimed by the garbage collector.


What are those people called when they the pick up rubbish bins?

They are called bin men. Dustman, garbage carter, garbage collector, garbage hauler, garbage man, garbageman, garbo, refuse collector


Memorymically and and not reclaming it when it is no longer it is needed in java there is no such problem as there is as garbage collector what is it?

I guess you want to talk about the garbage collector feature that Java has. The garbage collector is an automated program that the Java virtual machine would run once in a while. This program would clean up unused memory to ensure that there is enough memory available for the programs. you can invoke the garbage collector by calling the system.gc() method but this does not guarantee an invocation of the garbage collector. the JVM may or may not call the GC when we invoke it...


How do you write a Program on garbage collector in java?

Garbage collection is an operation that happens automatically in Java. We cannot write programs to perform them. All we can do is call the system's implementation of the Garbage collector and hope that it would execute. "Runtime.gc();" Place the above piece of code in your code, if you want to invoke the garbage collector. Invoking the runtime's implementation of the gc does not guarantee the execution of the garbage collector. It may or may not run. The JVM decides on that.


What is a euphemism for garbage collector?

Trash man