Runs the garbage collector
public class SystemExample {
public static void main(String[] args) {
System.gc();
}
}
or
public class SystemExample {
public static void main(String[] args) {
Runtime.getRuntime().gc();
}
}
Java source code examplesJava source code samples. Java code examples. |
|
Runs the garbage collector
public class SystemExample {
public static void main(String[] args) {
System.gc();
}
}
or
public class SystemExample {
public static void main(String[] args) {
Runtime.getRuntime().gc();
}
}
Tags: java.lang