Java Runtime Class
The Runtime class is part of the Java.lang package , i.e Java.lang.Runtime, and every Java programme has a single instance of it. It allows the application to interact with the environment in which it is operating.
The declaration of java.lang.Runtime class is:
public class Runtime extends Object
This class has a number of methods which are listed below:
|S.N||Methods & Description|
Returns the amount of free memory in the Java Virtual Machine.
Returns the maximum amount of memory that the Java virtual machine will attempt to use.
Returns the total amount of memory in the Java virtual machine.
This class inherits the methods of the following class:
To open the online compiler click here.