dcsimg

How do I find out how much system memory is available in my system?

John Zukowski

The Runtime class has two methods to help you determine memory resources: freeMemory() and totalMemory(). The freeMemory() method reports the free bytes in Java's memory space. The totalMemory() reports the total bytes in Java's memory space.