What is the difference between System.out.exit(0) and System.exit(1) ?

Author Topic: What is the difference between System.out.exit(0) and System.exit(1) ?  (Read 6129 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 158
  • Karma: 0
    • We Helpline
System.exit(0) terminates the program normally. Whereas System.exit(1) terminates the program because of some error encountered in the program.


Offline Lishmalinyjames

  • Trade Count: (0)
  • Hero Member
  • *****
  • Thank You 1
  • Posts: 804
  • Karma: 0
    • Oneplus Service Center in Chennai
exit(0) : This causes the program to exit with a successful termination. exit(1) : This causes the program to exit with a system-specific meaning.

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3009 Views
Last post 01-07-2011, 02:42:49
by Psycho
0 Replies
3740 Views
Last post 11-01-2011, 02:51:14
by Walalayo
20 Replies
11860 Views
Last post 06-23-2015, 10:53:36
by Talukdar
29 Replies
28980 Views
Last post 02-09-2020, 22:28:54
by infinitywebsoln
28 Replies
20663 Views
Last post 01-08-2016, 06:03:12
by trinhkute