Java get Free Memory
In this section, we are going to obtain the free memory. In order to get the memory left of being allocated, the method getruntime() returns the runtime object associated with the Java application.
freeMemory- This method returns the amount of free memory.
Here is the code of GetFreeMemory.java
public class GetFreeMemory
|
Output will be displayed as: