public class Memory{
public static void main(String args[])
{
System.out.println("total Memory is "+Runtime.getRuntime.totalMemory());
System.out.println("freeMemory is "+Runtime.getRuntime.freelMemory());
System.out.println("maximum Memory is "+Runtime.getRuntime.maxMemory());
}
output will be:
total memory is 5177344
free memory is 4996952
maximum memory is 66620112
public static void main(String args[])
{
System.out.println("total Memory is "+Runtime.getRuntime.totalMemory());
System.out.println("freeMemory is "+Runtime.getRuntime.freelMemory());
System.out.println("maximum Memory is "+Runtime.getRuntime.maxMemory());
}
output will be:
total memory is 5177344
free memory is 4996952
maximum memory is 66620112
No comments:
Post a Comment