Java basics
freeMemory()
The java.lang.Runtime.freeMemory() method returns the amount of free memory in the Java Virtual Machine. Calling the gc method may result in increasing the value returned by freeMemory.
Syntax:public long freeMemory()
Example:public class RuntimeDemo {
public static void main(String[] args) {
// print when the program starts
System.out.println("Program starting...");
// print the number of free bytes
System.out.println("" + Runtime.getRuntime().freeMemory());
}
}
Content
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 132 / 159176636. Delta: 0.00263 с