Get maximum size of heap in bytes. : Runtime « Development Class « Java
- Java
- Development Class
- Runtime
Get maximum size of heap in bytes.
public class Main {
public static void main(String[] argv) {
long heapMaxSize = Runtime.getRuntime().maxMemory();
System.out.println(heapMaxSize);
}
}
Related examples in the same category