system.exit in java

Java Exit

Java Exit: In coding, sometimes, Java programmer may need to terminate the running program (application) if the required condition is not met. Or, at the will of the user (when user wants), the program should get terminated; like when the user clicks a button, the game program should end (terminate)…