What is the purpose of the Runtime class? - JAVA Interview Questions

What is the purpose of the Runtime class?


The purpose of the Runtime class is to provide access to the Java runtime system.

It returns the runtime information like memory availability.

* Runtime.freeMemory() --> Returns JVM Free Memory
* Runtime.maxMemory() --> Returns the maximum amount of memory that the JVM will attempt to use. It also helps to run the garbage collector
* Runtime.gc()



Click Here to See Answer .....
Did you like this article ?
Subscribe to my RSS feed and get more JAVA Question, and Guideline, Plus a lot more great advice to help your Software Career.

0 comments:

Related JAVA Questions Posts