Java tutorial
public class Main { public static void main(String[] args) { // print the total memory Runtime runTime = Runtime.getRuntime(); System.out.println(runTime.totalMemory()); } }