File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes System.gc() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "System.gc()" Watch "System.gc()" New topic


chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

Hello ,

i want to know whether i need System.gc() for SCJP5 .

I think its not in SCJP6.

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902

chetan dhumane wrote:Hello ,

i want to know whether i need System.gc() for SCJP5 .

I think its not in SCJP6.

Not exactly a "System.gc()", but you should no How JVM's garbage collection works and which elements are considered for GC when GC threads awake (You can expect a question on this).

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Jari Timonen
Ranch Hand

Joined: Jan 16, 2004
Posts: 230

SCJP 5.0, SCJD URLyBird 1.3.3, OCMJEA 5 (SCEA) Factory Homes
Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

As Jari pointed out, explicit call to System.gc() was in the objectives of SCJP 5 but has been removed from SCJP 6...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: System.gc()
Similar Threads
garbage collection
what is the difference b/w Runtime.gc() and System.gc()? which one is best?
Is there a way to ensure gc() will run?
if Java has garbage collection, then why
why two gc() method ?