What is the purpose of the Runtime class

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

Showing Answers 1 - 2 of 2 Answers

Suresh

  • Mar 30th, 2006
 

Which returns the runtime information like memory availablility

  • Runtime.freeMemory() --> Returns JVM Free Memory
  • Runtime.maxMemory() --> Returns the maximum amount of memory that the JVM will attempt to use.

also helps to run the garbage collector

  • Runtime.gc()

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions