Pages

How to get total memory in jvm ???

*********************************************************
COMPLETE SOURCE CODE FOR : GetTotalMemoryInJvm.java
*********************************************************


public class GetTotalMemoryInJvm
{
public static void main(String[]args)
{
//Print total memory in java virtual machine in bytes
System.out.println("TOTAL MEMORY IN JVM : "+Runtime.getRuntime().totalMemory());
}
}


*********************************************************
JUST COMPILE AND EXECUTE IT
*********************************************************
Related Posts Plugin for WordPress, Blogger...