program to check free Memory and total Memory in java

import java.lang.System;
import java.lang.Runtime;
import java.io.IOException;

public class RuntimeMemApp
 {
 public static void main(String args[]) throws IOException
 {
  Runtime r = Runtime.getRuntime();
  System.out.println(r.totalMemory());
  System.out.println(r.freeMemory());
 }
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|