Javatpoint Logo
Javatpoint Logo

Java Process exitValue() Method

This exitValue() method of JavaProcess class is used to return the exit value of processes and subprocesses.

Syntax

Parameter

NA

Return

This method is used to return the exit values of subprocesses. By default, the value 0 indicates successful termination.

Example 1

Output:

Let us create a new process
Process is waiting
Process is destroyed
Exit Value:1

Example 2

Output:

Success 

Next TopicJava Process



Help Others, Please Share

facebook twitter pinterest