Home
Java Tutorial
Language
Data Type
Operators
Statement Control
Class Definition
Development
Reflection
Regular Expressions
Collections
Thread
File
Generics
I18N
Swing
Swing Event
2D Graphics
SWT
SWT 2D Graphics
Network
Database
Hibernate
JPA
JSP
JSTL
Servlet
Web Services SOA
EJB3
Spring
PDF
Email
J2ME
J2EE Application
XML
Design Pattern
Log
Security
Apache Common
Ant
JUnit
Run the garbage collector using System class : Garbage Collection « Language « Java Tutorial
Java Tutorial
Language
Garbage Collection
public
class
Main {
public
static
void
main(String[] args) { System.gc(); } }
1.8.Garbage Collection
1.8.1.
Run object finalization using System class
1.8.2.
Run the garbage collector using System class
1.8.3.
The Lifetime of an Object