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

I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

638


What is ctrl m character?

518


What is the default execution method in java?

624


How does varargs work in java?

611


Explain the use of javap tool.

632






State the merge-sort principle and its time complexity.

573


Can you inherit a constructor java?

577


How big is a 32 bit integer?

527


What is local declaration?

489


how to create multithreaded program? : Java thread

508


What is a line separator in java?

540


What are internal and external variables?

546


What is gc()?

581


What is java util collection?

559


Can a class have multiple superclasses?

569