January 2002
Intermediate to advanced
264 pages
8h 3m
English
java.lang.Runtime
This class is a stripped-down version of the J2SE
Runtime class. Aside from the static
getRuntime() method, which ensures a single
Runtime object for the system, this class consists
of only four methods to encapsulate platform-dependent system
functions: two for monitoring total and currently used memory, one
for garbage collection, and one to exit the program.
public classRuntime{ // static methods public static RuntimegetRuntime(); // public instance methods public voidexit(int status); public native longfreeMemory(); public native voidgc(); public native longtotalMemory(); }
Read now
Unlock full access