Home  >  Forum  >  Core Java
Post New Query

Use of System.exit in java



Asked on March 27, 2014
What does  System.exit() do in our java program and
what are the  scenario to use it.?



Replied on March 30, 2014
System.exit(int status)   terminates the running java virtual machine.  Passing status code has no predefined meaning. The meaning of status code is defined by user. By convention

System.exit(0) : means every thing went okay
System.exit( Non zero) :  means abnormal exit.



Write Answer




©2019 concretepage.com | Privacy Policy | Contact Us