3:53 pm - Wednesday March 25, 2505

Garbage collector in java with Example Program

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

GARBAGE COLLECTOR:

When an object is no longer referred to by any variable, java automatically reclaims memory used by that object. This is known as garbage collection.

System.gc() method may be used to call it explicitly.

  Runtime.gc()

Method: finalize() –This method is used just before an object is destroyed and can be called just prior to garbage collection.

Filed in: Z-A All Java Codes

No comments yet.

Leave a Reply