The purpose of the Runtime class is to provide access to the Java
Runtime system. This class provides certain important methods like:
1. Runtime.freeMemory() – This method returns the value of
free memory in JVM
2. Runtime.maxMemory() - This method returns the value of
maximum memory that JVM can use.
3. Runtime.gc() – This method can invoke garbage collection.