Here you can find the source of getMaxMemory()
public static long getMaxMemory()
//package com.java2s; //License from project: Open Source License public class Main { public static long getMaxMemory() { return Runtime.getRuntime().maxMemory(); }/*w w w. j a v a 2 s . c o m*/ }