All About Class Runtime in Java

Every Java application has a single instance of class Runtime. Runtime class allows the application to interact with the environment in which the application is running. The current runtime can be obtained from the getRuntime() method as an application can not create it's own instance of this class.
The structure of the class is as follows :

public class java.lang.Runtime extends java.lang.Object{
public Process exec(String command);
public Process exec(String command,String exp[]);
public Process exec(String commandArray[]);
public Process exec(String commandArray[],String exp[]);
public void exit(int status);
public long freeMemory();
public void gc();
public InputStream getLocalizedInputStream(InputStream in);
public OutputStream getLocalizedOutputStream(OutputStream out);
public static getRuntime();
public void load(String fileName);
public void loadLibrary(String libName);
public void runFinalization();
public long totalMemory();
public void traceInstruction(boolean on);
public void traceMethodCalls(boolean on);
All About Class Runtime in Java All About Class Runtime in Java Reviewed by Animesh Chatterjee on September 18, 2018 Rating: 5

No comments:

Powered by Blogger.