what is the difference between System.exit() and
System.exit(1)?

Answer Posted / balu

A non-zero exit status code, usually indicates abnormal termination. if n != 0, its up to the programmer to apply a meaning to the various n's.

From http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are unchecked exceptions in java?

610


What is a finally block? Is there a case when finally will not execute?

544


What is outofmemoryerror in java?

559


What is args length in java?

659


Can we execute a program without main() method?

526






Explain importance of finally block in java?

578


What modifiers may be used with a top-level class?

571


Can the garbage collection be forced by any means?

528


How to check if a list is sorted in java?

586


How to find the index of the largest number in an arraylist java?

513


What is the use of isempty in java?

534


What does += mean coding?

507


Is simpledateformat safe to use in the multithreaded program?

537


What is composition in java?

721


What are the different types of constructor?

518