Java-WaitFor and ExitValue

WaitFor and ExitValue The waitFor( ) method return the exit code returned by the process. This method does not return until the process from which it is called terminates. The exitValue( ) method return an exit code obtained from a subprocess. In the following program, an object of the Runtime class is first obtained by invoking … Read more…