This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Garbage Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Garbage Collection" Watch "Garbage Collection" New topic
Author

Garbage Collection

Mubeen Shaik
Ranch Hand

Joined: Jan 26, 2004
Posts: 67
Hi All,
I am new to Java and I am confused Garbage Collection. Please explain me this with some good example.
I want to know when exactly GC will be occur? Also want to know more about finalize() method.

Thanks in advance,
Mubeen Shaik.


Sun Certified Java Programmer
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I want to know when exactly GC will be occur?
You can't. You're not intended to be able to do so.
Also want to know more about finalize() method.
What do you want to know? Perhaps you want to read the explanation contained in the Object class documentation.
You might also like a read of Section 12.6 Finalization of Class Instances of the Java Language Specification.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Also, JavaWorld has a number of articles on garbage collection, which may interest you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Garbage Collection