Runtime.getRuntime().maxMemory()/freeMemory()/totalMemory()
freeMemory()ReturnstheamountoffreememoryintheJavaVirtualMachine.maxMemory()ReturnsthemaximumamountofmemorythattheJavavirtualmachinewillattempttouse.totalMemory()ReturnsthetotalamountofmemoryintheJavav