Comment on Tutorial - Garbage collection and Finalize() method By aathishankaran



Comment Added by : Amit

Comment Added at : 2011-07-25 05:26:47

Comment on Tutorial : Garbage collection and Finalize() method By aathishankaran
Gan,

Above print is not working because your object has not been garbage collected.If you want to print it , make reference of this object null and then call System.gc() and System.runFinalization().

Garbage collection happens automatically and you may not be sure when your object will be destroyed .


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. To DD -

The comment you just posted

View Tutorial          By: Alex at 2011-09-30 10:36:11

2. I want an example...to get multiple values using S
View Tutorial          By: Madhu at 2015-07-13 19:57:14

3. its good
View Tutorial          By: Srinu at 2011-05-26 23:57:18

4. I have to ask; Where do we put the text boxes?
View Tutorial          By: Jeremy at 2010-10-07 14:37:07

5. Good Example ...For Both FIleWriter and FileReader
View Tutorial          By: karthikeyan.v at 2009-11-17 02:27:42

6. what will be the output of 'X' in following code a
View Tutorial          By: Amit Goyal at 2009-09-25 05:48:45

7. Your Crystal report viewer showing all the records
View Tutorial          By: Neel at 2013-06-09 15:02:15

8. Thanks for the clear illustration of the MVC2 arch
View Tutorial          By: Tayo at 2010-01-03 12:53:46

9. Excellent Example to explain the functions
View Tutorial          By: manish at 2010-08-05 03:10:43

10. I have a sample code in which,

obje

View Tutorial          By: Tan Mi at 2011-10-25 23:24:10