Runtime class encapsulates the run-time environment.The current runtime can be obtained from the
getRuntime method.Once we obtain a reference to the current Runtime object,we can call several methods that control the state and behaviour of the JVM.Basically this class is used for memory management and executing additional processes.
The Runtime class has various methods ranging from executing processes to exiting their instances.
The declaration for Runtime class is shown below:
RuntimeDemo CODE class RuntimeDemo OUTPUT DESCRIPTION At LINE A we canget correct runtime by using THINGS TO TRY
|