The `java.lang.System.exit` method is a part of the Java programming language and is used to terminate the currently running Java Virtual Machine (JVM). It stops the execution of the program and shuts down the JVM. This method takes an integer argument, known as the exit status, which can be used to indicate the reason for termination or any error code. When `System.exit` is called, it immediately stops the execution of the program and any further code after it is not executed. This method is commonly used in situations where the program needs to be forcefully terminated or when there is an error that cannot be recovered from. It is important to use this method with caution as it abruptly ends the program and any cleanup or resources release should be handled before calling it.
Java System.exit - 30 examples found. These are the top rated real world Java examples of java.lang.System.exit extracted from open source projects. You can rate examples to help us improve the quality of examples.