public class Runtime extends Object
Modifier and Type | Method and Description |
---|---|
void |
addShutdownHook(Thread hook)
Add a shutdown hook.
|
void |
exit(int code)
Terminate the application.
|
long |
freeMemory()
Return the amount of free memory.on the heap
|
static Runtime |
getRuntime()
Get the single instance of us.
|
void |
halt(int code)
Terminate the application immediately
|
boolean |
removeShutdownHook(Thread hook)
Remove a previously installed shutdown hook from the system.
|
long |
totalMemory()
Return the size of the heap in bytes.
|
public void addShutdownHook(Thread hook)
hook
- public void exit(int code)
public long freeMemory()
public static Runtime getRuntime()
public void halt(int code)
public boolean removeShutdownHook(Thread hook)
hook
- public long totalMemory()