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



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

Answer / 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

More Core Java Interview Questions

What are the limitations for static method?

3 Answers   Greenwood,


what are different ways in which a thread can enter the waiting state? : Java thread

0 Answers  


What is close method? How it's different from Finalize & Dispose?

0 Answers   InfoAxon Technologies,


By what default value is an object reference declared as an instance variable?

1 Answers   Wipro,


Explain creating threads by implementing runnable class?

0 Answers  






What is nan inf?

0 Answers  


for what purpose we use applets ?

3 Answers   Mindlogicx,


What is the need of transient variables in Java ?

0 Answers   MCN Solutions,


What methods are called, When we navigate from one applet to another applet?

1 Answers  


Explain importance of inheritance in java?

0 Answers  


What if I write static public void instead of public static void in java?

0 Answers   Winsol Solutions,


How do you declare a variable?

0 Answers  


Categories