public class TestGetRuntime {
public static void main(String[] args) {
Runtime rt = Runtime.getRuntime();
System.out.println(”freeMemory “+rt.freeMemory());
System.out.println(”maxMemory “+rt.maxMemory());
System.out.println(”totalMemory “+rt.totalMemory());
}
}